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