woocommerce/tests/legacy
Nestor Soriano 884fd08462 Add a workaround for code hacking static methods on already loaded files.
The unit testing bootstrap loads and initializes WooCommerce, this
loads a bunch of code files that can't then be hacked in the test hooks.

A workaround is provided in this commit for the case of hacking
static methods. A new StaticWrapper class is created that allows
defining mock methods after the code file has been loaded.
This is applied to all classes from a fixed list in the bootstrap,
before WooCommerce is initialized. The list should be kept up to date
with the list of classes that require such workaround.
2020-05-20 09:56:25 +02:00
..
data Add unit test and a sample Woo plugin file 2020-05-01 22:47:08 +05:30
framework All code hacking files moved to src\Testing folder. 2020-05-20 09:56:25 +02:00
includes Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
unit-tests Miscellaneous code hacking fixes: 2020-05-20 09:56:25 +02:00
bootstrap.php Add a workaround for code hacking static methods on already loaded files. 2020-05-20 09:56:25 +02:00
classes-that-need-static-wrapper.php Add a workaround for code hacking static methods on already loaded files. 2020-05-20 09:56:25 +02:00