summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/registration/ExtensionRegistryTest.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:31:33 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:31:33 -0400
commit150f94f051128f367bc89f6b7e5f57eb2a69fc62 (patch)
tree181f454813b310ee97385058c6c6f2e3f34d5fd8 /tests/phpunit/includes/registration/ExtensionRegistryTest.php
parent7e85254903c7c0cb49e381f16b18441ea7b058cc (diff)
parent80f7dc77d430774192b929d780f96260066df2ee (diff)
Merge commit '80f7dc'
# Conflicts: # extensions/ArchInterWiki.sql
Diffstat (limited to 'tests/phpunit/includes/registration/ExtensionRegistryTest.php')
-rw-r--r--tests/phpunit/includes/registration/ExtensionRegistryTest.php49
1 files changed, 48 insertions, 1 deletions
diff --git a/tests/phpunit/includes/registration/ExtensionRegistryTest.php b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
index d7d4f198..c3a0c8d4 100644
--- a/tests/phpunit/includes/registration/ExtensionRegistryTest.php
+++ b/tests/phpunit/includes/registration/ExtensionRegistryTest.php
@@ -102,6 +102,50 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
)
),
array(
+ 'Global already set, 1d array that appends',
+ array(
+ 'mwAvailableRights' => array(
+ 'foobar',
+ 'foo'
+ ),
+ ),
+ array(
+ 'mwAvailableRights' => array(
+ 'barbaz',
+ ),
+ ),
+ array(
+ 'mwAvailableRights' => array(
+ 'barbaz',
+ 'foobar',
+ 'foo',
+ ),
+ )
+ ),
+ array(
+ 'Global already set, array with integer keys',
+ array(
+ 'mwNamespacesFoo' => array(
+ 100 => true,
+ 102 => false
+ ),
+ ),
+ array(
+ 'mwNamespacesFoo' => array(
+ 100 => false,
+ 500 => true,
+ ExtensionRegistry::MERGE_STRATEGY => 'array_plus',
+ ),
+ ),
+ array(
+ 'mwNamespacesFoo' => array(
+ 100 => true,
+ 102 => false,
+ 500 => true,
+ ),
+ )
+ ),
+ array(
'No global already set, $wgHooks',
array(
'wgHooks' => array(),
@@ -111,6 +155,7 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
'FooBarEvent' => array(
'FooBarClass::onFooBarEvent'
),
+ ExtensionRegistry::MERGE_STRATEGY => 'array_merge_recursive'
),
),
array(
@@ -138,6 +183,7 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
'FooBarEvent' => array(
'BazBarClass::onFooBarEvent',
),
+ ExtensionRegistry::MERGE_STRATEGY => 'array_merge_recursive',
),
),
array(
@@ -172,7 +218,8 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
'user' => array(
'right' => true,
'somethingtwo' => false,
- )
+ ),
+ ExtensionRegistry::MERGE_STRATEGY => 'array_plus_2d',
),
),
array(