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 "Remove empty RevisionRecordTest"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
MediaWikiTest.php
diff --git
a/tests/phpunit/includes/MediaWikiTest.php
b/tests/phpunit/includes/MediaWikiTest.php
index
e196243
..
a8d1e33
100644
(file)
--- a/
tests/phpunit/includes/MediaWikiTest.php
+++ b/
tests/phpunit/includes/MediaWikiTest.php
@@
-4,116
+4,116
@@
class MediaWikiTest extends MediaWikiTestCase {
protected function setUp() {
parent::setUp();
protected function setUp() {
parent::setUp();
- $this->setMwGlobals(
array(
+ $this->setMwGlobals(
[
'wgServer' => 'http://example.org',
'wgScriptPath' => '/w',
'wgScript' => '/w/index.php',
'wgArticlePath' => '/wiki/$1',
'wgServer' => 'http://example.org',
'wgScriptPath' => '/w',
'wgScript' => '/w/index.php',
'wgArticlePath' => '/wiki/$1',
- 'wgActionPaths' =>
array()
,
-
)
);
+ 'wgActionPaths' =>
[]
,
+
]
);
}
public static function provideTryNormaliseRedirect() {
}
public static function provideTryNormaliseRedirect() {
- return
array(
- array(
+ return
[
+ [
// View: Canonical
'url' => 'http://example.org/wiki/Foo_Bar',
// View: Canonical
'url' => 'http://example.org/wiki/Foo_Bar',
- 'query' =>
array()
,
+ 'query' =>
[]
,
'title' => 'Foo_Bar',
'redirect' => false,
'title' => 'Foo_Bar',
'redirect' => false,
-
)
,
- array(
+
]
,
+ [
// View: Escaped title
'url' => 'http://example.org/wiki/Foo%20Bar',
// View: Escaped title
'url' => 'http://example.org/wiki/Foo%20Bar',
- 'query' =>
array()
,
+ 'query' =>
[]
,
'title' => 'Foo_Bar',
'redirect' => 'http://example.org/wiki/Foo_Bar',
'title' => 'Foo_Bar',
'redirect' => 'http://example.org/wiki/Foo_Bar',
-
)
,
- array(
+
]
,
+ [
// View: Script path
'url' => 'http://example.org/w/index.php?title=Foo_Bar',
// View: Script path
'url' => 'http://example.org/w/index.php?title=Foo_Bar',
- 'query' =>
array( 'title' => 'Foo_Bar' )
,
+ 'query' =>
[ 'title' => 'Foo_Bar' ]
,
'title' => 'Foo_Bar',
'title' => 'Foo_Bar',
- 'redirect' =>
'http://example.org/wiki/Foo_Bar'
,
-
)
,
- array(
+ 'redirect' =>
false
,
+
]
,
+ [
// View: Script path with implicit title from page id
'url' => 'http://example.org/w/index.php?curid=123',
// View: Script path with implicit title from page id
'url' => 'http://example.org/w/index.php?curid=123',
- 'query' =>
array( 'curid' => '123' )
,
+ 'query' =>
[ 'curid' => '123' ]
,
'title' => 'Foo_Bar',
'redirect' => false,
'title' => 'Foo_Bar',
'redirect' => false,
-
)
,
- array(
+
]
,
+ [
// View: Script path with implicit title from revision id
'url' => 'http://example.org/w/index.php?oldid=123',
// View: Script path with implicit title from revision id
'url' => 'http://example.org/w/index.php?oldid=123',
- 'query' =>
array( 'oldid' => '123' )
,
+ 'query' =>
[ 'oldid' => '123' ]
,
'title' => 'Foo_Bar',
'redirect' => false,
'title' => 'Foo_Bar',
'redirect' => false,
-
)
,
- array(
+
]
,
+ [
// View: Script path without title
'url' => 'http://example.org/w/index.php',
// View: Script path without title
'url' => 'http://example.org/w/index.php',
- 'query' =>
array()
,
+ 'query' =>
[]
,
'title' => 'Main_Page',
'redirect' => 'http://example.org/wiki/Main_Page',
'title' => 'Main_Page',
'redirect' => 'http://example.org/wiki/Main_Page',
-
)
,
- array(
+
]
,
+ [
// View: Script path with empty title
'url' => 'http://example.org/w/index.php?title=',
// View: Script path with empty title
'url' => 'http://example.org/w/index.php?title=',
- 'query' =>
array( 'title' => '' )
,
+ 'query' =>
[ 'title' => '' ]
,
'title' => 'Main_Page',
'redirect' => 'http://example.org/wiki/Main_Page',
'title' => 'Main_Page',
'redirect' => 'http://example.org/wiki/Main_Page',
-
)
,
- array(
+
]
,
+ [
// View: Index with escaped title
'url' => 'http://example.org/w/index.php?title=Foo%20Bar',
// View: Index with escaped title
'url' => 'http://example.org/w/index.php?title=Foo%20Bar',
- 'query' =>
array( 'title' => 'Foo Bar' )
,
+ 'query' =>
[ 'title' => 'Foo Bar' ]
,
'title' => 'Foo_Bar',
'redirect' => 'http://example.org/wiki/Foo_Bar',
'title' => 'Foo_Bar',
'redirect' => 'http://example.org/wiki/Foo_Bar',
-
)
,
- array(
+
]
,
+ [
// View: Script path with escaped title
'url' => 'http://example.org/w/?title=Foo_Bar',
// View: Script path with escaped title
'url' => 'http://example.org/w/?title=Foo_Bar',
- 'query' =>
array( 'title' => 'Foo_Bar' )
,
+ 'query' =>
[ 'title' => 'Foo_Bar' ]
,
'title' => 'Foo_Bar',
'title' => 'Foo_Bar',
- 'redirect' =>
'http://example.org/wiki/Foo_Bar'
,
-
)
,
- array(
+ 'redirect' =>
false
,
+
]
,
+ [
// View: Root path with escaped title
'url' => 'http://example.org/?title=Foo_Bar',
// View: Root path with escaped title
'url' => 'http://example.org/?title=Foo_Bar',
- 'query' =>
array( 'title' => 'Foo_Bar' )
,
+ 'query' =>
[ 'title' => 'Foo_Bar' ]
,
'title' => 'Foo_Bar',
'title' => 'Foo_Bar',
- 'redirect' =>
'http://example.org/wiki/Foo_Bar'
,
-
)
,
- array(
+ 'redirect' =>
false
,
+
]
,
+ [
// View: Canonical with redundant query
'url' => 'http://example.org/wiki/Foo_Bar?action=view',
// View: Canonical with redundant query
'url' => 'http://example.org/wiki/Foo_Bar?action=view',
- 'query' =>
array( 'action' => 'view' )
,
+ 'query' =>
[ 'action' => 'view' ]
,
'title' => 'Foo_Bar',
'title' => 'Foo_Bar',
- 'redirect' =>
'http://example.org/wiki/Foo_Bar'
,
-
)
,
- array(
+ 'redirect' =>
false
,
+
]
,
+ [
// Edit: Canonical view url with action query
'url' => 'http://example.org/wiki/Foo_Bar?action=edit',
// Edit: Canonical view url with action query
'url' => 'http://example.org/wiki/Foo_Bar?action=edit',
- 'query' =>
array( 'action' => 'edit' )
,
+ 'query' =>
[ 'action' => 'edit' ]
,
'title' => 'Foo_Bar',
'redirect' => false,
'title' => 'Foo_Bar',
'redirect' => false,
-
)
,
- array(
+
]
,
+ [
// View: Index with action query
'url' => 'http://example.org/w/index.php?title=Foo_Bar&action=view',
// View: Index with action query
'url' => 'http://example.org/w/index.php?title=Foo_Bar&action=view',
- 'query' =>
array( 'title' => 'Foo_Bar', 'action' => 'view' )
,
+ 'query' =>
[ 'title' => 'Foo_Bar', 'action' => 'view' ]
,
'title' => 'Foo_Bar',
'title' => 'Foo_Bar',
- 'redirect' =>
'http://example.org/wiki/Foo_Bar'
,
-
)
,
- array(
+ 'redirect' =>
false
,
+
]
,
+ [
// Edit: Index with action query
'url' => 'http://example.org/w/index.php?title=Foo_Bar&action=edit',
// Edit: Index with action query
'url' => 'http://example.org/w/index.php?title=Foo_Bar&action=edit',
- 'query' =>
array( 'title' => 'Foo_Bar', 'action' => 'edit' )
,
+ 'query' =>
[ 'title' => 'Foo_Bar', 'action' => 'edit' ]
,
'title' => 'Foo_Bar',
'redirect' => false,
'title' => 'Foo_Bar',
'redirect' => false,
-
)
,
-
)
;
+
]
,
+
]
;
}
/**
}
/**