GlobalIdFieldTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 4
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSimpleMethods() 0 8 1
1
<?php
2
/*
3
 * This file is a part of GraphQL project.
4
 *
5
 * @author Alexandr Viniychuk <[email protected]>
6
 * created: 10:51 PM 5/18/16
7
 */
8
9
namespace Youshido\Tests\Library\Relay;
10
11
12
use Youshido\GraphQL\Relay\Field\GlobalIdField;
13
use Youshido\GraphQL\Type\NonNullType;
14
use Youshido\GraphQL\Type\Scalar\IdType;
15
16
class GlobalIdFieldTest extends \PHPUnit_Framework_TestCase
17
{
18
19
    public function testSimpleMethods()
20
    {
21
        $typeName = 'user';
22
        $field    = new GlobalIdField($typeName);
23
        $this->assertEquals('id', $field->getName());
24
        $this->assertEquals('The ID of an object', $field->getDescription());
25
        $this->assertEquals(new NonNullType(new IdType()), $field->getType());
26
    }
27
}
28