Passed
Pull Request — master (#63)
by David
01:54
created

NamingStrategyTest::testGetInputTypeName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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