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

test_deprecated_annotation_can_be_loaded()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 0
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