Change WC_Unit_Test_Case to extend WP_HTTP_TestCase instead of WP_UnitTestCase
This commits changes WC_Unit_Test_Case parent class to WP_HTTP_TestCase (which extends WP_UnitTestCase). This way all WC core test classes can benefit from the functionality provided by WP_HTTP_TestCase if needed. This is necessary because otherwise test classes can use the functionality provided by WC_Unit_Test_Case or WP_HTTP_TestCase. This change should not affect test classes that don't explicitly call one of the WP_HTTP_TestCase features.
This commit is contained in:
parent
b9cdc760ac
commit
1860cd1933
|
@ -110,10 +110,10 @@ class WC_Unit_Tests_Bootstrap {
|
|||
require_once $this->tests_dir . '/framework/vendor/class-wp-test-spy-rest-server.php';
|
||||
|
||||
// test cases
|
||||
require_once $this->tests_dir . '/includes/wp-http-testcase.php';
|
||||
require_once $this->tests_dir . '/framework/class-wc-unit-test-case.php';
|
||||
require_once $this->tests_dir . '/framework/class-wc-api-unit-test-case.php';
|
||||
require_once $this->tests_dir . '/framework/class-wc-rest-unit-test-case.php';
|
||||
require_once $this->tests_dir . '/includes/wp-http-testcase.php';
|
||||
|
||||
// Helpers
|
||||
require_once $this->tests_dir . '/framework/helpers/class-wc-helper-product.php';
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
class WC_Unit_Test_Case extends WP_UnitTestCase {
|
||||
class WC_Unit_Test_Case extends WP_HTTP_TestCase {
|
||||
|
||||
/**
|
||||
* Holds the WC_Unit_Test_Factory instance.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
class WC_Tests_Formatting_Functions extends WP_HTTP_TestCase {
|
||||
class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case {
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Meta
|
||||
* @package WooCommerce\Tests\Importer
|
||||
*/
|
||||
class WC_Tests_Product_CSV_Importer extends WP_HTTP_TestCase {
|
||||
class WC_Tests_Product_CSV_Importer extends WC_Unit_Test_Case {
|
||||
|
||||
/**
|
||||
* Test CSV file path.
|
||||
|
|
Loading…
Reference in New Issue