spec\Prophecy\Argument\Token\ArrayEntryTokenSpec::it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken PHP Метод

it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken() публичный Метод

public it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken ( Prophecy\Argument\Token\TokenInterface $key, Prophecy\Argument\Token\TokenInterface $value, ArrayAccess $object )
$key Prophecy\Argument\Token\TokenInterface
$value Prophecy\Argument\Token\TokenInterface
$object ArrayAccess
    function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken(TokenInterface $key, TokenInterface $value, \ArrayAccess $object)
    {
        $key->__toString()->willReturn('any_token');
        $this->beConstructedWith($key, $value);
        $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object' . PHP_EOL . 'But you used `any_token`.';
        $this->shouldThrow(new InvalidArgumentException($errorMessage))->duringScoreArgument($object);
    }