Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function testBypass() |
||
12 | { |
||
13 | $ajaxRequest = $this->createMock(HTTPRequest::class); |
||
14 | $ajaxRequest->method('isAjax')->willReturn(true); |
||
|
|||
15 | |||
16 | $simpleRequest = $this->createMock(HTTPRequest::class); |
||
17 | $simpleRequest->method('isAjax')->willReturn(false); |
||
18 | |||
19 | $ajaxBypass = new AjaxBypass(); |
||
20 | |||
21 | $this->assertFalse($ajaxBypass->checkRequestForBypass($simpleRequest)); |
||
22 | $this->assertTrue($ajaxBypass->checkRequestForBypass($ajaxRequest)); |
||
23 | } |
||
25 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.