You are here

function ReflectionClassNewInstancePatchSpec::it_supports_ReflectionClass_only in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php \spec\Prophecy\Doubler\ClassPatch\ReflectionClassNewInstancePatchSpec::it_supports_ReflectionClass_only()

Parameters

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

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

File

vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php, line 24

Class

ReflectionClassNewInstancePatchSpec

Namespace

spec\Prophecy\Doubler\ClassPatch

Code

function it_supports_ReflectionClass_only($reflectionClassNode, $anotherClassNode) {
  $reflectionClassNode
    ->getParentClass()
    ->willReturn('ReflectionClass');
  $anotherClassNode
    ->getParentClass()
    ->willReturn('stdClass');
  $this
    ->supports($reflectionClassNode)
    ->shouldReturn(true);
  $this
    ->supports($anotherClassNode)
    ->shouldReturn(false);
}