TypeTest::testException()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace TheCodingMachine\GraphQL\Controllers\Annotations;
4
5
use PHPUnit\Framework\TestCase;
6
use RuntimeException;
7
8
class TypeTest extends TestCase
9
{
10
    public function testException()
11
    {
12
        $type = new Type([]);
13
        $this->expectException(RuntimeException::class);
14
        $this->expectExceptionMessage('Empty class for @Type annotation. You MUST create the Type annotation object using the GraphQL-Controllers AnnotationReader');
15
        $type->getClass();
16
    }
17
}
18