function ArrayEntryTokenSpec::it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php \spec\Prophecy\Argument\Token\ArrayEntryTokenSpec::it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken()
Parameters
\Prophecy\Argument\Token\AnyValuesToken $key:
\Prophecy\Argument\Token\TokenInterface $value:
\ArrayAccess $object:
File
- vendor/
phpspec/ prophecy/ spec/ Prophecy/ Argument/ Token/ ArrayEntryTokenSpec.php, line 96
Class
Namespace
spec\Prophecy\Argument\TokenCode
function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken($key, $value, $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);
}