You are here

function ArgumentsWildcardSpec::it_should_return_false_if_one_of_the_tokens_returns_false in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php \spec\Prophecy\Argument\ArgumentsWildcardSpec::it_should_return_false_if_one_of_the_tokens_returns_false()

Parameters

\Prophecy\Argument\Token\TokenInterface $token1:

\Prophecy\Argument\Token\TokenInterface $token2:

\Prophecy\Argument\Token\TokenInterface $token3:

File

vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php, line 114

Class

ArgumentsWildcardSpec

Namespace

spec\Prophecy\Argument

Code

function it_should_return_false_if_one_of_the_tokens_returns_false($token1, $token2, $token3) {
  $token1
    ->scoreArgument('one')
    ->willReturn(3);
  $token1
    ->isLast()
    ->willReturn(false);
  $token2
    ->scoreArgument(2)
    ->willReturn(false);
  $token2
    ->isLast()
    ->willReturn(false);
  $token3
    ->scoreArgument($obj = new \stdClass())
    ->willReturn(10);
  $token3
    ->isLast()
    ->willReturn(false);
  $this
    ->beConstructedWith(array(
    $token1,
    $token2,
    $token3,
  ));
  $this
    ->scoreArguments(array(
    'one',
    2,
    $obj,
  ))
    ->shouldReturn(false);
}