Completed
Pull Request — 1.4.x (#106)
by Grégoire
02:25
created

AnnotationDriverTest::testGetAllClassNames()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\Persistence\Mapping;
4
5
use Doctrine\Common\Annotations\AnnotationReader;
6
use Doctrine\Entity;
7
use Doctrine\Persistence\Mapping\ClassMetadata;
8
use Doctrine\Persistence\Mapping\Driver\AnnotationDriver;
9
use Doctrine\TestClass;
10
use PHPUnit\Framework\TestCase;
11
12
class AnnotationDriverTest extends TestCase
13
{
14
    public function testGetAllClassNames()
15
    {
16
        $reader = new AnnotationReader();
17
        $driver = new SimpleAnnotationDriver($reader, [__DIR__ . '/_files/annotation']);
18
19
        $classes = $driver->getAllClassNames();
20
21
        self::assertSame([TestClass::class], $classes);
22
    }
23
}
24
25
class SimpleAnnotationDriver extends AnnotationDriver
26
{
27
    /** @var bool[] */
28
    protected $entityAnnotationClasses = [Entity::class => true];
29
30
    public function loadMetadataForClass($className, ClassMetadata $metadata)
31
    {
32
    }
33
}
34