| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 62 | public function testNextSearchResult() { |
||
| 63 | |||
| 64 | $searchResult = $this->getMockBuilder( '\SearchResult' ) |
||
| 65 | ->disableOriginalConstructor() |
||
| 66 | ->getMock(); |
||
| 67 | |||
| 68 | $fakeTitle = $this->getMockBuilder( '\Title' ) |
||
| 69 | ->disableOriginalConstructor() |
||
| 70 | ->getMock(); |
||
| 71 | |||
| 72 | $searchMatches = array( $searchResult, $fakeTitle, 'Foo' ); |
||
| 73 | $termMatches = array(); |
||
| 74 | |||
| 75 | $instance = new MappedSearchResultSet( $searchMatches, $termMatches ); |
||
| 76 | |||
| 77 | $this->assertEquals( |
||
| 78 | $searchResult, |
||
| 79 | $instance->next() |
||
| 80 | ); |
||
| 81 | |||
| 82 | $this->assertInstanceOf( |
||
| 83 | '\SearchResult', |
||
| 84 | $instance->next() |
||
| 85 | ); |
||
| 86 | |||
| 87 | $this->assertFalse( |
||
| 88 | $instance->next() |
||
| 89 | ); |
||
| 90 | } |
||
| 91 | |||
| 93 |