Exemplo n.º 1
0
 public function testFindRequired_UnexpectedToken()
 {
     $reader = $this->oneTokenReader()->thenAnOpenTag->thenAnEcho->thenSomeSpace->thenAString("content")->thenASemiColon->thenACloseTag;
     $access = new \vc\Tokens\Search($reader);
     try {
         $access->findRequired(array(Token::T_CLOSE_TAG, Token::T_SEMICOLON), array(Token::T_OPEN_TAG, Token::T_WHITESPACE));
         $this->fail("An expected exception was not thrown");
     } catch (\vc\Tokens\Exception\UnexpectedToken $err) {
     }
     $this->assertHasToken(Token::T_ECHO, $reader);
 }