You are here

function ClassNodeSpec::it_can_has_methods in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php \spec\Prophecy\Doubler\Generator\Node\ClassNodeSpec::it_can_has_methods()

Parameters

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

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

File

vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php, line 73

Class

ClassNodeSpec

Namespace

spec\Prophecy\Doubler\Generator\Node

Code

function it_can_has_methods($method1, $method2) {
  $method1
    ->getName()
    ->willReturn('__construct');
  $method2
    ->getName()
    ->willReturn('getName');
  $this
    ->addMethod($method1);
  $this
    ->addMethod($method2);
  $this
    ->getMethods()
    ->shouldReturn(array(
    '__construct' => $method1,
    'getName' => $method2,
  ));
}