GlobalIdFieldTest::testSimpleMethods()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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