woocommerce/tests/legacy/framework
Nestor Soriano 8a60e7e147
Move code hacker resetting from BeforeTestHook to setUp
The code hacker needs to be reset before each test. This was done via
a couple of classes implementeing BeforeTestHook, those were registered
in phpunit.xml.

The problem is that the PHPUnit version used for WooCommerce unit test
has recently been changed from 7.5 to 6.5 for compatibility with
PHP 7.0, and hook classes were introduced in PHPUnit 7. Thus no hooks
were ran, the code hacker wasn't reset, that caused some functions
to remain hacked between tests, and this made some tests to fail.

The solution is to move the code hacker reset to the setUp method
in the base unit test class.
2021-04-12 12:42:39 +02:00
..
helpers Add shipping, tax and fee lines to refund response for better information. 2020-11-11 18:47:48 +05:30
traits Add test for null meta value as well 2020-08-13 14:17:28 +05:30
vendor Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-api-unit-test-case.php Convert optional-before-required arguments to required. 2020-10-02 09:45:09 +02:00
class-wc-dummy-data-store.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-mock-payment-gateway.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-mock-session-handler.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-mock-wc-data.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-mock-wc-object-query.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-payment-token-stub.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-rest-unit-test-case.php Add a do_rest_request method to WC_REST_Unit_Test_Case. 2021-03-25 14:56:34 +01:00
class-wc-unit-test-case.php Move code hacker resetting from BeforeTestHook to setUp 2021-04-12 12:42:39 +02:00
class-wc-unit-test-factory.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00