$stream =
new TokenStream();
$stream->
push(new Token(Token::TYPE_DELIMITER, '.', 2
));
$stream->
getNextIdentifier();
} public function testGetNextIdentifierOrStar() { $stream =
new TokenStream();
$stream->
push(new Token(Token::TYPE_IDENTIFIER, 'h1', 0
));
$this->
assertEquals('h1',
$stream->
getNextIdentifierOrStar());
$stream->
push(new Token(Token::TYPE_DELIMITER, '*', 0
));
$this->
assertNull($stream->
getNextIdentifierOrStar());
} public function testFailToGetNextIdentifierOrStar() { $this->
expectException(SyntaxErrorException::
class);
$stream =
new TokenStream();
$stream->
push(new Token(Token::TYPE_DELIMITER, '.', 2
));