Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function testHandle() |
||
20 | { |
||
21 | // Check that it passes when ENABLE_GRAPHIQL=true |
||
22 | $this->assertMiddlewarePasses(new GraphiQLTokenMiddleware(true, null)); |
||
23 | |||
24 | // Check that it passes even if ENABLE_GRAPHIQL=false as long as a valid token is supplied |
||
25 | $token = 'foo'; |
||
26 | $request = new Request(); |
||
27 | $request->merge([ |
||
28 | 'token' => $token, |
||
29 | ]); |
||
30 | |||
31 | $this->assertMiddlewarePasses(new GraphiQLTokenMiddleware(false, $token), $request); |
||
32 | } |
||
43 |