Passed
Pull Request — master (#126)
by David
05:10
created

AddInterfaceOnDaoTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 13
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetName() 0 4 1
A testConstruct() 0 4 1
1
<?php
2
3
namespace TheCodingMachine\TDBM\Utils\Annotation;
4
5
use BadMethodCallException;
6
use PHPUnit\Framework\TestCase;
7
use TheCodingMachine\TDBM\Utils\GeneratorListenerInterface;
8
9
class AddInterfaceOnDaoTest extends TestCase
10
{
11
12
    public function testConstruct(): void
13
    {
14
        $this->expectException(BadMethodCallException::class);
15
        new AddInterfaceOnDao(['foo' => 'bar']);
16
    }
17
18
    public function testGetName(): void
19
    {
20
        $interfaces = new AddInterfaceOnDao(['name' => GeneratorListenerInterface::class]);
21
        $this->assertSame(GeneratorListenerInterface::class, $interfaces->getName());
22
    }
23
}
24