You are here

function ArrayEntryTokenSpec::it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens 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_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens()

Parameters

\Prophecy\Argument\Token\ExactValueToken $key:

\Prophecy\Argument\Token\TokenInterface $value:

\ArrayAccess $object:

File

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

Class

ArrayEntryTokenSpec

Namespace

spec\Prophecy\Argument\Token

Code

function it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object) {
  $object
    ->offsetExists('key')
    ->willReturn(true);
  $object
    ->offsetGet('key')
    ->willReturn('value');
  $key
    ->getValue()
    ->willReturn('key');
  $key
    ->scoreArgument('key')
    ->willReturn(3);
  $value
    ->scoreArgument('value')
    ->willReturn(1);
  $this
    ->scoreArgument($object)
    ->shouldBe(2);
}