X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fuser%2FUserArrayFromResultTest.php;h=beaacec800ba1161300ea6679f86d3ebe4ad9abd;hb=25ee9366b06a44087e8f0cba1f2b27324259ef52;hp=469ad2967107240cd707397fc11a2ae2d4641ec6;hpb=25d33bacb3496e9acb6ec0d7147b48a6a552c81d;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/user/UserArrayFromResultTest.php b/tests/phpunit/includes/user/UserArrayFromResultTest.php index 469ad29671..beaacec800 100644 --- a/tests/phpunit/includes/user/UserArrayFromResultTest.php +++ b/tests/phpunit/includes/user/UserArrayFromResultTest.php @@ -1,13 +1,13 @@ 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 ], + ]; } /**