Mercurial > hg > isophonics-drupal-site
annotate vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace spec\Prophecy\Doubler\ClassPatch; |
Chris@0 | 4 |
Chris@0 | 5 use PhpSpec\ObjectBehavior; |
Chris@0 | 6 use Prophecy\Argument; |
Chris@0 | 7 use Prophecy\Doubler\Generator\Node\ClassNode; |
Chris@0 | 8 use Prophecy\Doubler\Generator\Node\MethodNode; |
Chris@0 | 9 |
Chris@0 | 10 class HhvmExceptionPatchSpec extends ObjectBehavior |
Chris@0 | 11 { |
Chris@0 | 12 function it_is_a_patch() |
Chris@0 | 13 { |
Chris@0 | 14 $this->shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); |
Chris@0 | 15 } |
Chris@0 | 16 |
Chris@0 | 17 function its_priority_is_minus_50() |
Chris@0 | 18 { |
Chris@0 | 19 $this->getPriority()->shouldReturn(-50); |
Chris@0 | 20 } |
Chris@0 | 21 |
Chris@0 | 22 function it_uses_parent_code_for_setTraceOptions(ClassNode $node, MethodNode $method, MethodNode $getterMethod) |
Chris@0 | 23 { |
Chris@0 | 24 $node->hasMethod('setTraceOptions')->willReturn(true); |
Chris@0 | 25 $node->getMethod('setTraceOptions')->willReturn($method); |
Chris@0 | 26 $node->hasMethod('getTraceOptions')->willReturn(true); |
Chris@0 | 27 $node->getMethod('getTraceOptions')->willReturn($getterMethod); |
Chris@0 | 28 |
Chris@0 | 29 $method->useParentCode()->shouldBeCalled(); |
Chris@0 | 30 $getterMethod->useParentCode()->shouldBeCalled(); |
Chris@0 | 31 |
Chris@0 | 32 $this->apply($node); |
Chris@0 | 33 } |
Chris@0 | 34 } |