You are here

function ProphecySubjectPatchSpec::it_forces_class_to_implement_ProphecySubjectInterface in Zircon Profile 8

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

Parameters

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

File

vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php, line 31

Class

ProphecySubjectPatchSpec

Namespace

spec\Prophecy\Doubler\ClassPatch

Code

function it_forces_class_to_implement_ProphecySubjectInterface($node) {
  $node
    ->addInterface('Prophecy\\Prophecy\\ProphecySubjectInterface')
    ->shouldBeCalled();
  $node
    ->addProperty('objectProphecy', 'private')
    ->willReturn(null);
  $node
    ->getMethods()
    ->willReturn(array());
  $node
    ->hasMethod(Argument::any())
    ->willReturn(false);
  $node
    ->addMethod(Argument::type('Prophecy\\Doubler\\Generator\\Node\\MethodNode'))
    ->willReturn(null);
  $node
    ->addMethod(Argument::type('Prophecy\\Doubler\\Generator\\Node\\MethodNode'))
    ->willReturn(null);
  $this
    ->apply($node);
}