wiki.techinc.nl/tests/phpunit/includes/search/SearchNearMatchResultSetTest.php
Erik Bernhardson c2a308075f Convert SearchResultSet to typical iteration
The funky iteration here was at best annoying. Switch
it over to an iterator based approach with appropriate
BC code to simulate the old iteration style.

Depends-On: I19a8d6621a130811871dec9335038797627d9448
Change-Id: I9fccda15dd58a0dc35771d3b5cd7a6e8b02514a0
2018-06-11 13:35:41 -07:00

15 lines
448 B
PHP

<?php
class SearchNearMatchResultSetTest extends PHPUnit\Framework\TestCase {
/**
* @covers SearchNearMatchResultSet::__construct
* @covers SearchNearMatchResultSet::numRows
*/
public function testNumRows() {
$resultSet = new SearchNearMatchResultSet( null );
$this->assertEquals( 0, $resultSet->numRows() );
$resultSet = new SearchNearMatchResultSet( Title::newMainPage() );
$this->assertEquals( 1, $resultSet->numRows() );
}
}