Passed
Pull Request — master (#116)
by David
03:20
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 PHPUnit\Framework\TestCase;
7
8
class PivotTableMethodsDescriptorTest extends TestCase
9
{
10
11
    public function testGetters()
12
    {
13
        $table = $this->createMock(Table::class);
0 ignored issues
show
Bug introduced by
The type TheCodingMachine\TDBM\Utils\Table was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
        $localFk = $this->createMock(ForeignKeyConstraint::class);
0 ignored issues
show
Bug introduced by
The type TheCodingMachine\TDBM\Utils\ForeignKeyConstraint was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
        $remoteFk = $this->createMock(ForeignKeyConstraint::class);
16
        $ns = $this->createMock(DefaultNamingStrategy::class);
17
        $descriptor = new PivotTableMethodsDescriptor($table, $fk1, $fk2, $ns, 'Bean\Namespace');
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $fk2 seems to be never defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable $fk1 seems to be never defined.
Loading history...
18
19
        $this->assertSame($table, $descriptor->getPivotTable());
20
        $this->assertSame($localFk, $descriptor->getLocalFk());
21
        $this->assertSame($remoteFk, $descriptor->getRemoteFk());
22
    }
23
}
24