We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
7 | class ExceptionTest extends TestCase |
||
8 | { |
||
9 | protected function setUp() |
||
10 | { |
||
11 | parent::setUp(); |
||
12 | |||
13 | static::bootKernel(['test_case' => 'exception']); |
||
14 | } |
||
15 | |||
16 | public function testExceptionIsMappedToAWarning() |
||
17 | { |
||
18 | $query = <<<'EOF' |
||
19 | query ExceptionQuery { |
||
20 | test |
||
21 | } |
||
22 | EOF; |
||
23 | |||
24 | $expectedData = [ |
||
25 | 'test' => null, |
||
26 | ]; |
||
27 | |||
28 | $expectedErrors = [ |
||
29 | [ |
||
30 | 'message' => 'Invalid argument exception', |
||
31 | 'locations' => [ |
||
32 | [ |
||
33 | 'line' => 2, |
||
34 | 'column' => 5, |
||
35 | ], |
||
36 | ], |
||
37 | 'path' => ['test'], |
||
38 | 'category' => 'user', |
||
39 | ], |
||
40 | ]; |
||
41 | |||
42 | $this->assertGraphQL($query, $expectedData, $expectedErrors); |
||
43 | } |
||
44 | } |
||
45 |