Completed
Push — master ( 76cdd3...1c9573 )
by David
14s
created

NamingStrategyTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetInputTypeName() 0 9 1
1
<?php
2
3
namespace TheCodingMachine\GraphQL\Controllers;
4
5
use PHPUnit\Framework\TestCase;
6
use TheCodingMachine\GraphQL\Controllers\Annotations\Factory;
7
8
class NamingStrategyTest extends TestCase
9
{
10
11
    public function testGetInputTypeName(): void
12
    {
13
        $namingStrategy = new NamingStrategy();
14
15
        $factory = new Factory();
16
        $this->assertSame('FooClassInput', $namingStrategy->getInputTypeName('Bar\\FooClass', $factory));
17
18
        $factory = new Factory(['name'=>'MyInputType']);
19
        $this->assertSame('MyInputType', $namingStrategy->getInputTypeName('Bar\\FooClass', $factory));
20
    }
21
}
22