function KeywordPatchSpec::it_will_remove_echo_and_eval_methods in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php \spec\Prophecy\Doubler\ClassPatch\KeywordPatchSpec::it_will_remove_echo_and_eval_methods()
Parameters
\Prophecy\Doubler\Generator\Node\ClassNode $node:
\Prophecy\Doubler\Generator\Node\MethodNode $method1:
\Prophecy\Doubler\Generator\Node\MethodNode $method2:
\Prophecy\Doubler\Generator\Node\MethodNode $method3:
File
- vendor/
phpspec/ prophecy/ spec/ Prophecy/ Doubler/ ClassPatch/ KeywordPatchSpec.php, line 27
Class
Namespace
spec\Prophecy\Doubler\ClassPatchCode
function it_will_remove_echo_and_eval_methods($node, $method1, $method2, $method3) {
$node
->removeMethod('eval')
->shouldBeCalled();
$node
->removeMethod('echo')
->shouldBeCalled();
$method1
->getName()
->willReturn('echo');
$method2
->getName()
->willReturn('eval');
$method3
->getName()
->willReturn('notKeyword');
$node
->getMethods()
->willReturn(array(
'echo' => $method1,
'eval' => $method2,
'notKeyword' => $method3,
));
$this
->apply($node);
}