Completed
Pull Request — master (#6412)
by Jarek
10:55
created

DDC6412Test   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetSingleIdentifierFieldName_NoIdEntity_ThrowsException() 0 8 1
1
<?php
2
3
namespace Doctrine\Tests\ORM\Functional\Ticket;
4
5
use Doctrine\Common\Persistence\Mapping\RuntimeReflectionService;
6
use Doctrine\ORM\Mapping\ClassMetadata;
7
use Doctrine\Tests\Models\DDC6412\DDC6412File;
8
use Doctrine\Tests\OrmTestCase;
9
10
/**
11
 * @author JarJak
12
 */
13
class DDC6412Test extends OrmTestCase
14
{
15
    public function testGetSingleIdentifierFieldName_NoIdEntity_ThrowsException()
16
    {
17
        $cm = new ClassMetadata(DDC6412File::class);
18
        $cm->initializeReflection(new RuntimeReflectionService());
19
20
        $this->expectException(\Doctrine\ORM\Mapping\MappingException::class);
21
        $cm->getSingleIdentifierFieldName();
22
    }
23
}