12 foreach ( $before as $key =>
$value ) {
14 if ( substr( $key, 0, 2 ) ==
'mw' ) {
23 'globals' => $globals,
28 'autoloaderPaths' => []
31 $class =
new ReflectionClass(
'ExtensionRegistry' );
32 $method = $class->getMethod(
'exportExtractedData' );
33 $method->setAccessible(
true );
34 $method->invokeArgs( $registry, [ $info ] );
35 foreach ( $expected as $name =>
$value ) {
36 $this->assertArrayHasKey( $name,
$GLOBALS, $desc );
42 foreach ( $before as $key =>
$value ) {
43 if ( substr( $key, 0, 2 ) ==
'mw' ) {
54 'Simple non-array values',
56 'mwtestFooBarConfig' =>
true,
57 'mwtestFooBarConfig2' =>
'string',
60 'mwtestFooBarDefault' => 1234,
61 'mwtestFooBarConfig' =>
false,
64 'mwtestFooBarConfig' =>
true,
65 'mwtestFooBarConfig2' =>
'string',
66 'mwtestFooBarDefault' => 1234,
70 'No global already set, simple array',
73 'mwtestDefaultOptions' => [
78 'mwtestDefaultOptions' => [
84 'Global already set, simple array',
86 'mwtestDefaultOptions' => [
92 'mwtestDefaultOptions' => [
98 'mwtestDefaultOptions' => [
106 'Global already set, 1d array that appends',
108 'mwAvailableRights' => [
114 'mwAvailableRights' => [
119 'mwAvailableRights' => [
127 'Global already set, array with integer keys',
129 'mwNamespacesFoo' => [
135 'mwNamespacesFoo' => [
142 'mwNamespacesFoo' => [
150 'No global already set, $wgHooks',
157 'FooBarClass::onFooBarEvent'
165 'FooBarClass::onFooBarEvent'
171 'Global already set, $wgHooks',
175 'FooBarClass::onFooBarEvent'
178 'FooBarClass::onBazBarEvent',
185 'BazBarClass::onFooBarEvent',
193 'FooBarClass::onFooBarEvent',
194 'BazBarClass::onFooBarEvent',
197 'FooBarClass::onBazBarEvent',
203 'Global already set, $wgGroupPermissions',
205 'wgGroupPermissions' => [
210 'somethingtwo' =>
true,
215 'wgGroupPermissions' => [
221 'somethingtwo' =>
false,
222 'nonduplicated' =>
true,
228 'wgGroupPermissions' => [
236 'somethingtwo' =>
true,
238 'nonduplicated' =>
true,
244 'False local setting should not be overridden (T100767)',
246 'mwtestT100767' =>
false,
249 'mwtestT100767' =>
true,
252 'mwtestT100767' =>
false,
256 'test array_replace_recursive',
258 'mwtestJsonConfigs' => [
259 'JsonZeroConfig' => [
267 'mwtestJsonConfigs' => [
268 'JsonZeroConfig' => [
278 'mwtestJsonConfigs' => [
279 'JsonZeroConfig' => [
$GLOBALS['wgAutoloadClasses']['LocalisationUpdate']
testExportExtractedDataGlobals( $desc, $before, $globals, $expected)
ExtensionRegistry::exportExtractedData provideExportExtractedDataGlobals.
static provideExportExtractedDataGlobals()
const MERGE_STRATEGY
Special key that defines the merge strategy.
processing should stop and the error should be shown to the user * false