You are here

function ClassNodeSpec::its_hasMethod_returns_false_if_method_has_been_removed 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::its_hasMethod_returns_false_if_method_has_been_removed()

Parameters

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

File

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

Class

ClassNodeSpec

Namespace

spec\Prophecy\Doubler\Generator\Node

Code

function its_hasMethod_returns_false_if_method_has_been_removed($method) {
  $method
    ->getName()
    ->willReturn('getName');
  $this
    ->addMethod($method);
  $this
    ->removeMethod('getName');
  $this
    ->hasMethod('getName')
    ->shouldReturn(false);
}