Type hint against LinkTarget in WatchedItemStore
[lhc/web/wiklou.git] / tests / phpunit / includes / TitleArrayFromResultTest.php
index 8882214..af49ecf 100644 (file)
@@ -4,12 +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();
@@ -61,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 );
        }
@@ -94,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 );
        }