Completed
Push — master ( 7f89eb...d01340 )
by Portey
05:11
created

InterfaceTypeConfigTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 5
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreation() 0 12 1
1
<?php
2
/*
3
* This file is a part of GraphQL project.
4
*
5
* @author Alexandr Viniychuk <[email protected]>
6
* created: 12/6/15 12:49 AM
7
*/
8
9
namespace Youshido\Tests\Type\Config;
10
11
use Youshido\GraphQL\Type\TypeMap;
12
use Youshido\Tests\Schema\CharacterInterface;
13
14
class InterfaceTypeConfigTest extends \PHPUnit_Framework_TestCase
15
{
16
17
    public function testCreation()
18
    {
19
        $characterInterface = new CharacterInterface();
20
        $this->assertEquals('Character', $characterInterface->getName());
21
        $this->assertEquals(TypeMap::KIND_INTERFACE, $characterInterface->getKind());
22
23
        $fields = $characterInterface->getConfig()->getFields();
24
        $this->assertArrayHasKey('id', $fields);
25
26
        $this->assertEquals(TypeMap::TYPE_ID, $fields['id']->getType()->getName());
27
        $this->assertEquals(TypeMap::KIND_SCALAR, $fields['id']->getType()->getKind());
28
    }
29
30
}
31