8a60e7e147
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. |
||
---|---|---|
.. | ||
data | ||
framework | ||
includes | ||
unit-tests | ||
bootstrap.php | ||
classes-with-mockable-static-methods.php | ||
mockable-functions.php |