woocommerce/tests/includes/code-hacking/hacks
Nestor Soriano 1a68abbc28 Miscellaneous code hacking fixes:
- Fix how CodeHackerTestHook::executeBeforeTest parses the test name,
  to account for warnings and tests with data sets.

- CodeHackerTestHook now includes a executeAfterTest hook that
  disables the code hacker (needed to prevent it from inadvertently
  altering further tests). Also, clear_hacks is executed in
  executeBeforeTest for the same reason.

- CodeHacker gets restore, clear_hacks and is_enabled methods
  to support the changes in CodeHackerTestHook.

- FunctionsMockerHack fixed so that it doesn't modify strings
  that are class method definitions.

- Added the WC_Unit_Test_Case::file_copy method, it must be used
  instead of the PHP built-in "copy" in tests, otherwise tests
  that run with the code hacker active will fail.
  This is something to investigate.
2020-05-20 09:56:25 +02:00
..
bypass-finals-hack.php Barebones implementation of a code hacker for unit tests. 2020-05-20 09:56:25 +02:00
code-hack.php Miscellaneous code hacking fixes: 2020-05-20 09:56:25 +02:00
functions-mocker-hack.php Miscellaneous code hacking fixes: 2020-05-20 09:56:25 +02:00
static-mocker-hack.php Barebones implementation of a code hacker for unit tests. 2020-05-20 09:56:25 +02:00