diff options
author | DannyS712 <dannys712.wiki@gmail.com> | 2021-09-28 01:37:54 +0000 |
---|---|---|
committer | DannyS712 <dannys712.wiki@gmail.com> | 2021-10-07 01:21:02 +0000 |
commit | 736e00ee8cb9c291f2d506f65faa91a007e48268 (patch) | |
tree | 7e9dd577dd16432b1aa7a22a9841ed025d0e0648 /tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php | |
parent | 6a55ce812e99e3fcbdf5c5c34a6b8506d8188182 (diff) | |
download | mediawikicore-736e00ee8cb9c291f2d506f65faa91a007e48268.tar.gz mediawikicore-736e00ee8cb9c291f2d506f65faa91a007e48268.zip |
resourceloader: omit `noscript` module from client registry
In all cases where the client registry is used, the `noscript` module
is inapplicable. Additionally, make it illegal to have a module
include the 'noscript' module as a dependency.
Bug: T291735
Change-Id: I5846f2c19b003989b56b12628b385fd37049483b
Diffstat (limited to 'tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php')
-rw-r--r-- | tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php index 927020e68782..c36fbae3ccbc 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php @@ -468,6 +468,32 @@ mw.loader.register([ ]);', ] ], [ [ + 'msg' => 'noscript group omitted (T291735)', + 'modules' => [ + 'test.not-noscript' => [ + 'class' => ResourceLoaderTestModule::class, + ], + 'test.noscript' => [ + 'class' => ResourceLoaderTestModule::class, + 'group' => 'noscript', + ], + 'test.also-noscript' => [ + 'class' => ResourceLoaderTestModule::class, + 'group' => 'noscript', + ], + ], + 'out' => ' +mw.loader.addSource({ + "local": "/w/load.php" +}); +mw.loader.register([ + [ + "test.not-noscript", + "" + ] +]);', + ] ], + [ [ // This may seem like an edge case, but a plain MediaWiki core install // with a few extensions installed is likely far more complex than this // even, not to mention an install like Wikipedia. |