add HPOSToggleTrait.php to unit test loader (#38684)
This PR fixes two unit test files that could not be run individually by adding HPOSToggleTrait.php to the unit test boot loader. It also does a bit of namespace cleanup in HPOSToggleTrait.php.
This commit is contained in:
commit
9704873fb6
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
add HPOSToggleTrait.php to unit test loader
|
|
@ -264,6 +264,7 @@ class WC_Unit_Tests_Bootstrap {
|
|||
|
||||
// Traits.
|
||||
require_once $this->tests_dir . '/framework/traits/trait-wc-rest-api-complex-meta.php';
|
||||
require_once dirname( $this->tests_dir ) . '/php/helpers/HPOSToggleTrait.php';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,12 +2,8 @@
|
|||
|
||||
namespace Automattic\WooCommerce\RestApi\UnitTests;
|
||||
|
||||
use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController;
|
||||
use Automattic\WooCommerce\Internal\DataStores\Orders\DataSynchronizer;
|
||||
use Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore;
|
||||
use Automattic\WooCommerce\Internal\Features\FeaturesController;
|
||||
use Automattic\WooCommerce\RestApi\UnitTests\Helpers\OrderHelper;
|
||||
use WC_Data_Store;
|
||||
|
||||
/**
|
||||
* Trait HPOSToggleTrait.
|
||||
|
|
|
@ -9,8 +9,6 @@ use Automattic\WooCommerce\RestApi\UnitTests\Helpers\OrderHelper;
|
|||
use Automattic\WooCommerce\RestApi\UnitTests\HPOSToggleTrait;
|
||||
use Automattic\WooCommerce\Utilities\OrderUtil;
|
||||
|
||||
require_once __DIR__ . '/../../../../helpers/HPOSToggleTrait.php';
|
||||
|
||||
/**
|
||||
* Class OrdersTableDataStoreTests.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue