Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class NewAnnotationReaderTest extends TestCase |
||
13 | { |
||
14 | /** @var MetadataCollection */ |
||
15 | private $collection; |
||
16 | |||
17 | /** @var NewAnnotationReader */ |
||
18 | private $reader; |
||
19 | |||
20 | public function setUp() |
||
26 | ); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @dataProvider examples |
||
31 | */ |
||
32 | public function testGetClassAnnotations(string $class, array $expected) |
||
33 | { |
||
34 | $class = new \ReflectionClass($class); |
||
35 | |||
36 | $annotations = $this->reader->getClassAnnotations($class); |
||
37 | |||
38 | $this->assertEquals( |
||
39 | $expected, |
||
40 | iterator_to_array($annotations) |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | public function examples(): iterable |
||
49 | ]; |
||
50 | } |
||
51 | |||
52 | private function createAnnotationTargetAll($name = null) |
||
68 |