Failed Conditions
Pull Request — 2.8.x (#7919)
by
unknown
07:31
created

AssociationOverrideTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test_deprecated_annotation_can_be_loaded() 0 7 1
A test_annotation_can_be_loaded() 0 5 1
1
<?php
2
3
namespace Doctrine\Tests\Annotation;
4
5
use Doctrine\ORM\Annotation\AssociationOverride as NewAssociationOverride;
6
use Doctrine\ORM\Mapping\AssociationOverride as LegacyAssociationOverride;
7
use PHPUnit\Framework\Error\Deprecated;
8
use PHPUnit\Framework\TestCase;
9
10
class AssociationOverrideTest extends TestCase
11
{
12
    public function test_annotation_can_be_loaded()
13
    {
14
        $newOverride = new NewAssociationOverride();
15
16
        self::assertInstanceOf(NewAssociationOverride::class, $newOverride);
17
    }
18
19
    public function test_deprecated_annotation_can_be_loaded()
20
    {
21
        $this->expectException(Deprecated::class);
22
23
        $legacyOverride = new LegacyAssociationOverride();
24
25
        self::assertInstanceOf(LegacyAssociationOverride::class, $legacyOverride);
26
    }
27
}
28