Total Complexity | 7 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class EmptyInnerResultIteratorTest extends TestCase |
||
8 | { |
||
9 | public function testOffsetUnset() |
||
10 | { |
||
11 | $iterator = new EmptyInnerResultIterator(); |
||
12 | $this->expectException(TDBMInvalidOperationException::class); |
||
13 | unset($iterator[42]); |
||
14 | } |
||
15 | |||
16 | public function testCount() |
||
17 | { |
||
18 | $iterator = new EmptyInnerResultIterator(); |
||
19 | $this->assertCount(0, $iterator); |
||
20 | } |
||
21 | |||
22 | public function testOffsetExists() |
||
23 | { |
||
24 | $iterator = new EmptyInnerResultIterator(); |
||
25 | $this->assertFalse(isset($iterator[0])); |
||
26 | } |
||
27 | |||
28 | public function testOffsetSet() |
||
33 | } |
||
34 | |||
35 | public function testIterate() |
||
36 | { |
||
37 | $iterator = new EmptyInnerResultIterator(); |
||
38 | foreach ($iterator as $elem) { |
||
39 | $this->fail('Iterator should be empty'); |
||
40 | } |
||
41 | |||
42 | $iterator->next(); |
||
43 | $this->assertNull($iterator->current()); |
||
|
|||
44 | $this->assertNull($iterator->key()); |
||
45 | } |
||
46 | |||
47 | public function testOffsetGet() |
||
52 | } |
||
53 | } |
||
54 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.