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
15 lines
448 B
PHP
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() );
|
|
}
|
|
}
|