You are here

function ArrayEntryTokenSpec::it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry in Zircon Profile 8

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

File

vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php, line 151

Class

ArrayEntryTokenSpec

Namespace

spec\Prophecy\Argument\Token

Code

function it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry($key, $value) {
  $argument = array(
    1 => 'foo',
    2 => 'bar',
  );
  $key
    ->scoreArgument(1)
    ->willReturn(true);
  $key
    ->scoreArgument(2)
    ->willReturn(false);
  $value
    ->scoreArgument('foo')
    ->willReturn(false);
  $value
    ->scoreArgument('bar')
    ->willReturn(true);
  $this
    ->scoreArgument($argument)
    ->shouldBe(false);
}