public function PhpParserTest::testIfPointerResetsOnMultipleParsingTries

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PhpParserTest.php, line 162

Class

PhpParserTest

Namespace

Doctrine\Tests\Common\Annotations

Code

public function testIfPointerResetsOnMultipleParsingTries() {
  $parser = new PhpParser();
  $class = new ReflectionClass(__NAMESPACE__ . '\\Fixtures\\NamespaceWithClosureDeclaration');
  $this
    ->assertEquals(array(
    'secure' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',
    'route' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',
    'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',
  ), $parser
    ->parseClass($class));
  $this
    ->assertEquals(array(
    'secure' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Secure',
    'route' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Route',
    'template' => __NAMESPACE__ . '\\Fixtures\\Annotation\\Template',
  ), $parser
    ->parseClass($class));
}