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 "Add SPARQL client to core"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
site
/
SitesCacheFileBuilderTest.php
diff --git
a/tests/phpunit/includes/site/SitesCacheFileBuilderTest.php
b/tests/phpunit/includes/site/SitesCacheFileBuilderTest.php
index
087341a
..
c411ed8
100644
(file)
--- a/
tests/phpunit/includes/site/SitesCacheFileBuilderTest.php
+++ b/
tests/phpunit/includes/site/SitesCacheFileBuilderTest.php
@@
-29,6
+29,8
@@
*/
class SitesCacheFileBuilderTest extends PHPUnit_Framework_TestCase {
*/
class SitesCacheFileBuilderTest extends PHPUnit_Framework_TestCase {
+ use MediaWikiCoversValidator;
+
protected function setUp() {
$this->cacheFile = $this->getCacheFile();
}
protected function setUp() {
$this->cacheFile = $this->getCacheFile();
}
@@
-46,48
+48,48
@@
class SitesCacheFileBuilderTest extends PHPUnit_Framework_TestCase {
}
private function getExpectedData() {
}
private function getExpectedData() {
- return
array(
- 'sites' =>
array(
- 'foobar' =>
array(
+ return
[
+ 'sites' =>
[
+ 'foobar' =>
[
'globalid' => 'foobar',
'type' => 'unknown',
'group' => 'none',
'source' => 'local',
'language' => null,
'globalid' => 'foobar',
'type' => 'unknown',
'group' => 'none',
'source' => 'local',
'language' => null,
- 'localids' =>
array()
,
- 'config' =>
array()
,
- 'data' =>
array()
,
+ 'localids' =>
[]
,
+ 'config' =>
[]
,
+ 'data' =>
[]
,
'forward' => false,
'internalid' => null,
'forward' => false,
'internalid' => null,
- 'identifiers' =>
array()
-
)
,
- 'enwiktionary' =>
array(
+ 'identifiers' =>
[]
+
]
,
+ 'enwiktionary' =>
[
'globalid' => 'enwiktionary',
'type' => 'mediawiki',
'group' => 'wiktionary',
'source' => 'local',
'language' => 'en',
'globalid' => 'enwiktionary',
'type' => 'mediawiki',
'group' => 'wiktionary',
'source' => 'local',
'language' => 'en',
- 'localids' =>
array(
- 'equivalent' =>
array( 'enwiktionary' )
-
)
,
- 'config' =>
array()
,
- 'data' =>
array(
- 'paths' =>
array(
+ 'localids' =>
[
+ 'equivalent' =>
[ 'enwiktionary' ]
+
]
,
+ 'config' =>
[]
,
+ 'data' =>
[
+ 'paths' =>
[
'page_path' => 'https://en.wiktionary.org/wiki/$1',
'file_path' => 'https://en.wiktionary.org/w/$1'
'page_path' => 'https://en.wiktionary.org/wiki/$1',
'file_path' => 'https://en.wiktionary.org/w/$1'
- )
-
)
,
+ ]
+
]
,
'forward' => false,
'internalid' => null,
'forward' => false,
'internalid' => null,
- 'identifiers' =>
array(
- array(
+ 'identifiers' =>
[
+ [
'type' => 'equivalent',
'key' => 'enwiktionary'
'type' => 'equivalent',
'key' => 'enwiktionary'
- )
- )
- )
- )
-
)
;
+ ]
+ ]
+ ]
+ ]
+
]
;
}
private function newSitesCacheFileBuilder( SiteList $sites ) {
}
private function newSitesCacheFileBuilder( SiteList $sites ) {
@@
-98,7
+100,7
@@
class SitesCacheFileBuilderTest extends PHPUnit_Framework_TestCase {
}
private function getSiteLookup( SiteList $sites ) {
}
private function getSiteLookup( SiteList $sites ) {
- $siteLookup = $this->getMockBuilder(
'SiteLookup'
)
+ $siteLookup = $this->getMockBuilder(
SiteLookup::class
)
->disableOriginalConstructor()
->getMock();
->disableOriginalConstructor()
->getMock();
@@
-110,7
+112,7
@@
class SitesCacheFileBuilderTest extends PHPUnit_Framework_TestCase {
}
private function getSites() {
}
private function getSites() {
- $sites =
array()
;
+ $sites =
[]
;
$site = new Site();
$site->setGlobalId( 'foobar' );
$site = new Site();
$site->setGlobalId( 'foobar' );