function SplFileInfoPatchSpec::it_updates_existing_method_if_found in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php \spec\Prophecy\Doubler\ClassPatch\SplFileInfoPatchSpec::it_updates_existing_method_if_found()
Parameters
\Prophecy\Doubler\Generator\Node\ClassNode $node:
\Prophecy\Doubler\Generator\Node\MethodNode $method:
File
- vendor/
phpspec/ prophecy/ spec/ Prophecy/ Doubler/ ClassPatch/ SplFileInfoPatchSpec.php, line 63
Class
Namespace
spec\Prophecy\Doubler\ClassPatchCode
function it_updates_existing_method_if_found($node, $method) {
$node
->hasMethod('__construct')
->willReturn(true);
$node
->getMethod('__construct')
->willReturn($method);
$node
->getParentClass()
->shouldBeCalled();
$method
->useParentCode()
->shouldBeCalled();
$this
->apply($node);
}