You are here

function HhvmExceptionPatchSpec::it_uses_parent_code_for_setTraceOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php \spec\Prophecy\Doubler\ClassPatch\HhvmExceptionPatchSpec::it_uses_parent_code_for_setTraceOptions()

Parameters

\Prophecy\Doubler\Generator\Node\ClassNode $node:

\Prophecy\Doubler\Generator\Node\MethodNode $method:

\Prophecy\Doubler\Generator\Node\MethodNode $getterMethod:

File

vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php, line 25

Class

HhvmExceptionPatchSpec

Namespace

spec\Prophecy\Doubler\ClassPatch

Code

function it_uses_parent_code_for_setTraceOptions($node, $method, $getterMethod) {
  $node
    ->hasMethod('setTraceOptions')
    ->willReturn(true);
  $node
    ->getMethod('setTraceOptions')
    ->willReturn($method);
  $node
    ->hasMethod('getTraceOptions')
    ->willReturn(true);
  $node
    ->getMethod('getTraceOptions')
    ->willReturn($getterMethod);
  $method
    ->useParentCode()
    ->shouldBeCalled();
  $getterMethod
    ->useParentCode()
    ->shouldBeCalled();
  $this
    ->apply($node);
}