woocommerce/tests/legacy
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
..
data Add unit test and a sample Woo plugin file 2020-05-01 22:47:08 +05:30
framework Move code hacker resetting from BeforeTestHook to setUp 2021-04-12 12:42:39 +02:00
includes Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
unit-tests Update data.php 2021-04-06 23:56:28 +02:00
bootstrap.php Reintroduce the dependency injection related code. 2020-10-08 09:28:05 +02:00
classes-with-mockable-static-methods.php Refactor the settings pages, and add unit tests for them. 2021-04-12 12:42:26 +02:00
mockable-functions.php Refactor the settings pages, and add unit tests for them. 2021-04-12 12:42:26 +02:00