ExtensionRegistry: Properly detect if a global is already set
[lhc/web/wiklou.git] / tests / phpunit / includes / registration / ExtensionRegistryTest.php
index 9b57e1c..5916b45 100644 (file)
@@ -287,6 +287,18 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
                                        ],
                                ],
                        ],
+                       [
+                               'global is null before',
+                               [
+                                       'NullGlobal' => null,
+                               ],
+                               [
+                                       'NullGlobal' => 'not-null'
+                               ],
+                               [
+                                       'NullGlobal' => null
+                               ],
+                       ],
                ];
        }
 }