Passed
Pull Request — master (#116)
by David
03:14
created

PivotTableMethodsDescriptorTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetters() 0 11 1
1
<?php
2
3
namespace TheCodingMachine\TDBM\Utils;
4
5
6
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
7
use Doctrine\DBAL\Schema\Table;
8
use PHPUnit\Framework\TestCase;
9
10
class PivotTableMethodsDescriptorTest extends TestCase
11
{
12
13
    public function testGetters()
14
    {
15
        $table = $this->createMock(Table::class);
16
        $localFk = $this->createMock(ForeignKeyConstraint::class);
17
        $remoteFk = $this->createMock(ForeignKeyConstraint::class);
18
        $ns = $this->createMock(DefaultNamingStrategy::class);
19
        $descriptor = new PivotTableMethodsDescriptor($table, $localFk, $remoteFk, $ns, 'Bean\Namespace');
20
21
        $this->assertSame($table, $descriptor->getPivotTable());
22
        $this->assertSame($localFk, $descriptor->getLocalFk());
23
        $this->assertSame($remoteFk, $descriptor->getRemoteFk());
24
    }
25
}
26