Failed Conditions
Pull Request — master (#1)
by Jonathan
03:48
created

SimpleAnnotationDriver   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 6
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadMetadataForClass() 0 2 1
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