Esempio n. 1
0
 function it_should_calculate_score_until_last_token(TokenInterface $token1, TokenInterface $token2, TokenInterface $token3)
 {
     $token1->scoreArgument('one')->willReturn(3);
     $token1->isLast()->willReturn(false);
     $token2->scoreArgument(2)->willReturn(7);
     $token2->isLast()->willReturn(true);
     $token3->scoreArgument($obj = new \stdClass())->willReturn(10);
     $token3->isLast()->willReturn(false);
     $this->beConstructedWith(array($token1, $token2, $token3));
     $this->scoreArguments(array('one', 2, $obj))->shouldReturn(10);
 }
 /**
  * Returns true if preset token is last.
  *
  * @return bool|int
  */
 public function isLast()
 {
     return $this->token->isLast();
 }