public function TokenStreamTest::testGetPeek in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/css-selector/Tests/Parser/TokenStreamTest.php \Symfony\Component\CssSelector\Tests\Parser\TokenStreamTest::testGetPeek()
File
- vendor/
symfony/ css-selector/ Tests/ Parser/ TokenStreamTest.php, line 31
Class
Namespace
Symfony\Component\CssSelector\Tests\ParserCode
public function testGetPeek() {
$stream = new TokenStream();
$stream
->push($t1 = new Token(Token::TYPE_IDENTIFIER, 'h1', 0));
$stream
->push($t2 = new Token(Token::TYPE_DELIMITER, '.', 2));
$stream
->push($t3 = new Token(Token::TYPE_IDENTIFIER, 'title', 3));
$this
->assertSame($t1, $stream
->getPeek());
$this
->assertSame($t1, $stream
->getNext());
$this
->assertSame($t2, $stream
->getPeek());
$this
->assertSame($t2, $stream
->getPeek());
$this
->assertSame($t2, $stream
->getNext());
}