X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fuser%2FUserArrayFromResultTest.php;h=beaacec800ba1161300ea6679f86d3ebe4ad9abd;hp=4bc776589d89da5671d6f03036108a69870f871d;hb=17e8f7d62ec6d660c1f073efdaa0cbda68d59ae3;hpb=4dc3ac1c375b3d2eb6172dfef8fdebe71b8c5f43 diff --git a/tests/phpunit/includes/user/UserArrayFromResultTest.php b/tests/phpunit/includes/user/UserArrayFromResultTest.php index 4bc776589d..beaacec800 100644 --- a/tests/phpunit/includes/user/UserArrayFromResultTest.php +++ b/tests/phpunit/includes/user/UserArrayFromResultTest.php @@ -7,7 +7,7 @@ class UserArrayFromResultTest extends MediaWikiTestCase { private function getMockResultWrapper( $row = null, $numRows = 1 ) { - $resultWrapper = $this->getMockBuilder( 'ResultWrapper' ) + $resultWrapper = $this->getMockBuilder( Wikimedia\Rdbms\ResultWrapper::class ) ->disableOriginalConstructor(); $resultWrapper = $resultWrapper->getMock(); @@ -57,16 +57,16 @@ class UserArrayFromResultTest extends MediaWikiTestCase { $this->assertEquals( $resultWrapper, $object->res ); $this->assertSame( 0, $object->key ); - $this->assertInstanceOf( 'User', $object->current ); + $this->assertInstanceOf( User::class, $object->current ); $this->assertEquals( $username, $object->current->mName ); } public static function provideNumberOfRows() { - return array( - array( 0 ), - array( 1 ), - array( 122 ), - ); + return [ + [ 0 ], + [ 1 ], + [ 122 ], + ]; } /** @@ -88,15 +88,15 @@ class UserArrayFromResultTest extends MediaWikiTestCase { $username = 'addshore'; $userRow = $this->getRowWithUsername( $username ); $object = $this->getUserArrayFromResult( $this->getMockResultWrapper( $userRow ) ); - $this->assertInstanceOf( 'User', $object->current() ); + $this->assertInstanceOf( User::class, $object->current() ); $this->assertEquals( $username, $object->current()->mName ); } public function provideTestValid() { - return array( - array( $this->getRowWithUsername(), true ), - array( false, false ), - ); + return [ + [ $this->getRowWithUsername(), true ], + [ false, false ], + ]; } /**