Giuseppe Mazzapica
Giuseppe Mazzapica
Hi @dingo-d what's in your `Init_Test_Case`? Brain Monkey to work necessitates of some setup (see https://github.com/Brain-WP/BrainMonkey/blob/master/docs/wordpress-setup.md#setup-tests) if your base test case don't include the setup, Brain Monkey will not work....
Just a quick update. The init test case looks fine, just strange you're using both WP_Mock and Brain Monkey, as both of them cover same use cases. But I'll look...
I guess this is some conflict with the PHPUnit coverage handling code. Have you tried to load patchwork manually in the PHPUnit bootstrap file before loading anything else (including composer...
I've did some tests, and had some problem loading Patchwork before autoload. This looks a bug at Patchwork (`as` in namespace import not handled correctly), I'll try to have time...
Thanks @dingo-d! At first glance it looks very fine. I'm just back from a 2 weeks vacation so I have piles of staff on my desk at work. Will try...
@dingo-d First feedback without looking at the actual code, but just reading you description. --- ## Do you teardown? Brain Monkey [`teardown()` function](https://github.com/Brain-WP/BrainMonkey/blob/master/inc/api.php#L35-L40) [calls `Patchwork\restoreAll()`](https://github.com/Brain-WP/BrainMonkey/blob/master/inc/api.php#L39), so if you have that...
@mbmjertan Redefinition is clearead after teardown (if not that's a bug on Patchwork). What _I think_ you're referring to is that the functions stay defined. And that's true, and this...
@zengheng3 I have been reported of some issues by loading Patchwork from autoloader. Your case seems another possible issue of this kind. I just pushed a branch named `patchwork-load-env` whic...
Sure. I am concerned that now removing the autoload could be a breaking change. I have to do some tests first.
Hi @Tabrisrp Brain Monkey is a tool to mock **functions**, _not_ **class methods**. If you're using modern PHPUnit version, you've at least two options to mock class methods without Brain...