dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "mw.widgets.CategoryMultiselectWidget use TagMultiselectWidget"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
user
/
UserArrayFromResultTest.php
diff --git
a/tests/phpunit/includes/user/UserArrayFromResultTest.php
b/tests/phpunit/includes/user/UserArrayFromResultTest.php
index
4bc7765
..
beaacec
100644
(file)
--- 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 ) {
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();
->disableOriginalConstructor();
$resultWrapper = $resultWrapper->getMock();
@@
-57,16
+57,16
@@
class UserArrayFromResultTest extends MediaWikiTestCase {
$this->assertEquals( $resultWrapper, $object->res );
$this->assertSame( 0, $object->key );
$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() {
$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 ) );
$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() {
$this->assertEquals( $username, $object->current()->mName );
}
public function provideTestValid() {
- return
array(
-
array( $this->getRowWithUsername(), true )
,
-
array( false, false )
,
-
)
;
+ return
[
+
[ $this->getRowWithUsername(), true ]
,
+
[ false, false ]
,
+
]
;
}
/**
}
/**