Skip to content

Commit

Permalink
#45 moved test asset into its own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Oct 24, 2016
1 parent 84d1620 commit e4bba8b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\DocParser;
use Doctrine\Tests\Common\Annotations\Fixtures\IgnoredNamespaces\AnnotatedAtClassLevel;
use Doctrine\Tests\Common\Annotations\Fixtures\IgnoredNamespaces\AnnotatedAtMethodLevel;

class AnnotationReaderTest extends AbstractReaderTest
{
Expand Down Expand Up @@ -73,6 +74,7 @@ public function testOmitNotRegisteredAnnotation()
$annotations = $reader->getMethodAnnotations($ref->getMethod('methodWithNotRegisteredAnnotation'));
$this->assertEquals(array(), $annotations);
}

public function testClassAnnotationIsIgnored()
{
$reader = $this->getReader();
Expand All @@ -86,13 +88,11 @@ public function testClassAnnotationIsIgnored()
public function testMethodAnnotationIsIgnored()
{
$reader = $this->getReader();
$ref = new \ReflectionClass('Doctrine\Tests\Common\Annotations\TestInvalidMethodAnnotationClass');
$ref = new \ReflectionClass(AnnotatedAtMethodLevel::class);

$reader::addGlobalIgnoredNamespace('SomeMethodAnnotationNamespace');

$annotations = $reader->getMethodAnnotations($ref->getMethod('test'));

$this->assertEquals(0, count($annotations));
self::assertEmpty($reader->getMethodAnnotations($ref->getMethod('test')));
}

public function testPropertyAnnotationIsIgnored()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Doctrine\Tests\Common\Annotations\Fixtures\IgnoredNamespaces;

class AnnotatedAtMethodLevel
{
/**
* @SomeMethodAnnotationNamespace\Subnamespace\Name
*/
public function test() {}
}

0 comments on commit e4bba8b

Please sign in to comment.