| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function testBypass() |
||
| 12 | { |
||
| 13 | $getRequest = $this->createMock(HTTPRequest::class); |
||
| 14 | $getRequest->method('httpMethod')->willReturn('GET'); |
||
|
|
|||
| 15 | |||
| 16 | $postRequest = $this->createMock(HTTPRequest::class); |
||
| 17 | $postRequest->method('httpMethod')->willReturn('POST'); |
||
| 18 | |||
| 19 | $putRequest = $this->createMock(HTTPRequest::class); |
||
| 20 | $putRequest->method('httpMethod')->willReturn('PUT'); |
||
| 21 | |||
| 22 | $delRequest = $this->createMock(HTTPRequest::class); |
||
| 23 | $delRequest->method('httpMethod')->willReturn('DELETE'); |
||
| 24 | |||
| 25 | $bypass = new HttpMethodBypass('GET', 'POST'); |
||
| 26 | |||
| 27 | $this->assertTrue($bypass->checkRequestForBypass($getRequest)); |
||
| 28 | $this->assertTrue($bypass->checkRequestForBypass($postRequest)); |
||
| 29 | $this->assertFalse($bypass->checkRequestForBypass($putRequest)); |
||
| 30 | $this->assertFalse($bypass->checkRequestForBypass($delRequest)); |
||
| 31 | } |
||
| 33 |
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.