Merge "Revert "Follow-up ee320648fd1: output mw-content-{ltr,rtl} unconditionally""
[lhc/web/wiklou.git] / tests / phpunit / includes / registration / ExtensionProcessorTest.php
index b95316c..d47ffa9 100644 (file)
@@ -36,6 +36,10 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
        }
 
        public static function provideRegisterHooks() {
+               // Format:
+               // Current $wgHooks
+               // Content in extension.json
+               // Expected value of $wgHooks
                return array(
                        // No hooks
                        array(
@@ -64,6 +68,22 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
                                        'FooBaz' => array( 'FooBazCallback' ),
                                ),
                        ),
+                       // Callbacks for FooBaz wrapped in an array
+                       array(
+                               array(),
+                               array( 'Hooks' => array( 'FooBaz' => array( 'Callback1' ) ) ) + self::$default,
+                               array(
+                                       'FooBaz' => array( 'Callback1' ),
+                               ),
+                       ),
+                       // Multiple callbacks for FooBaz hook
+                       array(
+                               array(),
+                               array( 'Hooks' => array( 'FooBaz' => array( 'Callback1', 'Callback2' ) ) ) + self::$default,
+                               array(
+                                       'FooBaz' => array( 'Callback1', 'Callback2' ),
+                               ),
+                       ),
                );
        }