Open
Description
Is is better to use php Closure and not to write php code in strings? This issue is the only one that stops me to use soft-mocks.
As it is now:
\Badoo\SoftMocks::redefineFunction(
'strlen',
'$a',
'return \\Badoo\\SoftMocks::callOriginal("strlen", [trim($a)]));'
);
Can be with closure:
\Badoo\SoftMocks::redefineFunction( 'strlen', function( $a ) {
return \Badoo\SoftMocks::callOriginal('strlen', [trim($a)]);
}) ;
Metadata
Metadata
Assignees
Labels
No labels