public function AbstractReaderTest::testAnnotationsWithVarType

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/AbstractReaderTest.php, line 95

Class

AbstractReaderTest

Namespace

Doctrine\Tests\Common\Annotations

Code

public function testAnnotationsWithVarType() {
  $reader = $this
    ->getReader();
  $class = new ReflectionClass('Doctrine\\Tests\\Common\\Annotations\\Fixtures\\ClassWithAnnotationWithVarType');
  $this
    ->assertEquals(1, count($fooAnnot = $reader
    ->getPropertyAnnotations($class
    ->getProperty('foo'))));
  $this
    ->assertEquals(1, count($barAnnot = $reader
    ->getMethodAnnotations($class
    ->getMethod('bar'))));
  $this
    ->assertInternalType('string', $fooAnnot[0]->string);
  $this
    ->assertInstanceOf('Doctrine\\Tests\\Common\\Annotations\\Fixtures\\AnnotationTargetAll', $barAnnot[0]->annotation);
}