public function DocLexerTest::testMarkerAnnotation

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocLexerTest.php, line 9

Class

DocLexerTest

Namespace

Doctrine\Tests\Common\Annotations

Code

public function testMarkerAnnotation() {
  $lexer = new DocLexer();
  $lexer
    ->setInput("@Name");
  $this
    ->assertNull($lexer->token);
  $this
    ->assertNull($lexer->lookahead);
  $this
    ->assertTrue($lexer
    ->moveNext());
  $this
    ->assertNull($lexer->token);
  $this
    ->assertEquals('@', $lexer->lookahead['value']);
  $this
    ->assertTrue($lexer
    ->moveNext());
  $this
    ->assertEquals('@', $lexer->token['value']);
  $this
    ->assertEquals('Name', $lexer->lookahead['value']);
  $this
    ->assertFalse($lexer
    ->moveNext());
}