X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FTitleArrayFromResultTest.php;h=af49ecf73ab7ea056765f33ecf22d66f8ef10695;hb=804970ba3dfc61c2e267189eff1fbfda68c4c80f;hp=7c2973f93f2c94eee14e98827fa4a236e8d3baf4;hpb=734ca2b4d2a1246fb0ea1e54b861ab423ab5e257;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/TitleArrayFromResultTest.php b/tests/phpunit/includes/TitleArrayFromResultTest.php index 7c2973f93f..af49ecf73a 100644 --- a/tests/phpunit/includes/TitleArrayFromResultTest.php +++ b/tests/phpunit/includes/TitleArrayFromResultTest.php @@ -4,10 +4,12 @@ * @author Addshore * @covers TitleArrayFromResult */ -class TitleArrayFromResultTest extends PHPUnit_Framework_TestCase { +class TitleArrayFromResultTest extends PHPUnit\Framework\TestCase { + + use MediaWikiCoversValidator; private function getMockResultWrapper( $row = null, $numRows = 1 ) { - $resultWrapper = $this->getMockBuilder( 'ResultWrapper' ) + $resultWrapper = $this->getMockBuilder( Wikimedia\Rdbms\ResultWrapper::class ) ->disableOriginalConstructor(); $resultWrapper = $resultWrapper->getMock(); @@ -59,7 +61,7 @@ class TitleArrayFromResultTest extends PHPUnit_Framework_TestCase { $this->assertEquals( $resultWrapper, $object->res ); $this->assertSame( 0, $object->key ); - $this->assertInstanceOf( 'Title', $object->current ); + $this->assertInstanceOf( Title::class, $object->current ); $this->assertEquals( $namespace, $object->current->mNamespace ); $this->assertEquals( $title, $object->current->mTextform ); } @@ -92,7 +94,7 @@ class TitleArrayFromResultTest extends PHPUnit_Framework_TestCase { $title = 'foo'; $row = $this->getRowWithTitle( $namespace, $title ); $object = $this->getTitleArrayFromResult( $this->getMockResultWrapper( $row ) ); - $this->assertInstanceOf( 'Title', $object->current() ); + $this->assertInstanceOf( Title::class, $object->current() ); $this->assertEquals( $namespace, $object->current->mNamespace ); $this->assertEquals( $title, $object->current->mTextform ); }