Completed
Push — master ( 0eb5d9...ce204c )
by David
14s
created

FailWithTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testException() 0 5 1
1
<?php
2
3
namespace TheCodingMachine\GraphQL\Controllers\Annotations;
4
5
use BadMethodCallException;
6
use PHPUnit\Framework\TestCase;
7
8
class FailWithTest extends TestCase
9
{
10
11
    public function testException()
12
    {
13
        $this->expectException(BadMethodCallException::class);
14
        $this->expectExceptionMessage('The @FailWith annotation must be passed a defaultValue. For instance: "@FailWith(null)"');
15
        new FailWith([]);
16
    }
17
}
18