Passed
Pull Request — master (#1)
by David
01:58
created

TdbmFluidJunctionTableOptionsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 6
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGraphql() 0 12 1
1
<?php
2
3
namespace TheCodingMachine\FluidSchema;
4
5
use Doctrine\DBAL\Schema\Schema;
6
use PHPUnit\Framework\TestCase;
7
8
class TdbmFluidJunctionTableOptionsTest extends TestCase
9
{
10
11
    public function testGraphql()
12
    {
13
        $schema = new Schema();
14
        $fluid = new TdbmFluidSchema($schema);
15
16
        $fluid->table('posts')->uuid();
17
        $fluid->table('users')->uuid();
18
19
        $fluid->junctionTable('posts', 'users')->graphql();
20
21
        $this->assertSame("\n@TheCodingMachine\\GraphQLite\\Annotations\\Field", $schema->getTable('posts_users')->getOptions()['comment']);
22
    }
23
}
24