| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 67 | public function testGetSlice() |
||
| 68 | { |
||
| 69 | $offset = 14; |
||
| 70 | $length = 20; |
||
| 71 | $slice = new \ArrayObject(); |
||
| 72 | |||
| 73 | $this->query |
||
| 74 | ->expects($this->once()) |
||
| 75 | ->method('limit') |
||
| 76 | ->with($length); |
||
| 77 | $this->query |
||
| 78 | ->expects($this->once()) |
||
| 79 | ->method('offset') |
||
| 80 | ->with($offset); |
||
| 81 | $this->query |
||
| 82 | ->expects($this->once()) |
||
| 83 | ->method('find') |
||
| 84 | ->will($this->returnValue($slice)); |
||
| 85 | |||
| 86 | $this->assertSame($slice, $this->adapter->getSlice($offset, $length)); |
||
| 87 | } |
||
| 88 | } |
||
| 89 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: