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); }
/** * @param \Prophecy\Argument\Token\TokenInterface $token1 * @param \Prophecy\Argument\Token\TokenInterface $token2 * @param \Prophecy\Argument\Token\TokenInterface $token3 */ function it_generates_string_representation_from_all_tokens_imploded($token1, $token2, $token3) { $token1->__toString()->willReturn('token_1'); $token2->__toString()->willReturn('token_2'); $token3->__toString()->willReturn('token_3'); $this->beConstructedWith(array($token1, $token2, $token3)); $this->__toString()->shouldReturn('token_1, token_2, token_3'); }