Failed Conditions
Push — travis-php7.4 ( 6887c5 )
by Michael
13:05
created

TargetTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testValidMixedTargets() 0 11 1
1
<?php
2
3
namespace Doctrine\Tests\Annotations\Annotation;
4
5
use Doctrine\Annotations\Annotation\Target;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * Tests for {@see \Doctrine\Annotations\Annotation\Target}
10
 *
11
 * @covers \Doctrine\Annotations\Annotation\Target
12
 */
13
class TargetTest extends TestCase
14
{
15
    /**
16
     * @group DDC-3006
17
     */
18
    public function testValidMixedTargets()
19
    {
20
        $target = new Target(['value' => ['ALL']]);
21
        self::assertEquals(Target::TARGET_ALL, $target->targets);
22
23
        $target = new Target(['value' => ['METHOD', 'METHOD']]);
24
        self::assertEquals(Target::TARGET_METHOD, $target->targets);
25
        self::assertNotEquals(Target::TARGET_PROPERTY, $target->targets);
26
27
        $target = new Target(['value' => ['PROPERTY', 'METHOD']]);
28
        self::assertEquals(Target::TARGET_METHOD | Target::TARGET_PROPERTY, $target->targets);
29
    }
30
}
31
32