Failed Conditions
Pull Request — master (#10)
by Adrien
02:25
created

UtilsTest::providerGetIDTypeName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLTests\Doctrine;
6
7
use GraphQL\Doctrine\Utils;
8
9
class UtilsTest extends \PHPUnit\Framework\TestCase
10
{
11
    public function providerGetTypeName(): array
12
    {
13
        return [
14
            ['\Blog\Model\Post', 'Post'],
15
            ['Blog\Model\Post', 'Post'],
16
            ['\Post', 'Post'],
17
            ['Post', 'Post'],
18
        ];
19
    }
20
21
    /**
22
     * @dataProvider providerGetTypeName
23
     *
24
     * @param string $input
25
     * @param string $expected
26
     */
27
    public function testGetTypeName(string $input, string $expected): void
28
    {
29
        self::assertSame($expected, Utils::getTypeName($input));
30
    }
31
}
32