You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The placeOptionalAndReferenceFunction method uses ReflectionFunction which throws an exception if a non-existent function name is passed:
[ReflectionException] Function somefunc() does not exist
Before that change it worked fine when trying to mock a non-existent function. This is a valid use case for a plugin architecture where you may not have desired functions in a test environment.
Can it be like this, for example:
if (function_exists($function)) {
$this->placeOptionalAndReferenceFunction($namespace, $function);
}
The text was updated successfully, but these errors were encountered:
The problem was introduced here:
https://github.com/Codeception/AspectMock/pull/133/files#diff-50b2697c4aa86740dcae323b3d7ebe44R44
The
placeOptionalAndReferenceFunction
method usesReflectionFunction
which throws an exception if a non-existent function name is passed:Before that change it worked fine when trying to mock a non-existent function. This is a valid use case for a plugin architecture where you may not have desired functions in a test environment.
Can it be like this, for example:
The text was updated successfully, but these errors were encountered: