function ArrayEntryTokenSpec::it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible 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_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible()
Parameters
\Prophecy\Argument\Token\AnyValuesToken $key:
\Prophecy\Argument\Token\TokenInterface $value:
\ArrayIterator $object:
File
- vendor/
phpspec/ prophecy/ spec/ Prophecy/ Argument/ Token/ ArrayEntryTokenSpec.php, line 125
Class
Namespace
spec\Prophecy\Argument\TokenCode
function it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible($key, $value, $object) {
$this
->beConstructedWith($key, $value);
$object
->current()
->will(function () use ($object) {
$object
->valid()
->willReturn(false);
return 'value';
});
$object
->key()
->willReturn('key');
$object
->rewind()
->willReturn(null);
$object
->next()
->willReturn(null);
$object
->valid()
->willReturn(true);
$this
->shouldNotThrow(new InvalidArgumentException())
->duringScoreArgument($object);
}