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

PivotTableMethodsDescriptorTest::testGetters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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