Failed Conditions
Pull Request — master (#1)
by Jonathan
03:48
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
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\Common\Persistence\Mapping;
4
5
use Doctrine\Common\Annotations\AnnotationReader;
6
use Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver;
7
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
8
use Doctrine\Entity;
9
use Doctrine\TestClass;
10
11
class AnnotationDriverTest extends \PHPUnit\Framework\TestCase
12
{
13
    public function testGetAllClassNames()
14
    {
15
        $reader = new AnnotationReader();
16
        $driver = new SimpleAnnotationDriver($reader, [__DIR__ . '/_files/annotation']);
17
18
        $classes = $driver->getAllClassNames();
19
20
        self::assertEquals([TestClass::class], $classes);
21
    }
22
}
23
24
class SimpleAnnotationDriver extends AnnotationDriver
25
{
26
    protected $entityAnnotationClasses = [Entity::class => true];
27
28
    public function loadMetadataForClass($className, ClassMetadata $metadata)
29
    {
30
    }
31
}
32