assertSame() is guaranteed to not do any type conversion. This can be critical when acciden tially comparing, for example, 0 to 0.0. Change-Id: Iffcc9bda69573623ba14af655dcd697d0fcce525
15 lines
446 B
PHP
15 lines
446 B
PHP
<?php
|
|
|
|
class SearchNearMatchResultSetTest extends PHPUnit\Framework\TestCase {
|
|
/**
|
|
* @covers SearchNearMatchResultSet::__construct
|
|
* @covers SearchNearMatchResultSet::numRows
|
|
*/
|
|
public function testNumRows() {
|
|
$resultSet = new SearchNearMatchResultSet( null );
|
|
$this->assertSame( 0, $resultSet->numRows() );
|
|
|
|
$resultSet = new SearchNearMatchResultSet( Title::newMainPage() );
|
|
$this->assertEquals( 1, $resultSet->numRows() );
|
|
}
|
|
}
|