Parse error when hook to mock is contains special chars.
Closed this issue · 0 comments
gmazzap commented
When mocking an hook that has special chars in names, e.g.
Filters::expectApplied( 'foo.bar' );
Test result is a parse error.
Reason is that internally Brain Monkey creates a Mockery mock using hook id, and Mockery creates a class using hook name as class name.
So, if the hook name is not valid as class name a parse error occurs.