X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fstructure%2FResourcesTest.php;h=9178bdb7191ca65a8fb1eb150db9c2358006c133;hb=fd62703d505e3e233fb7842d7349a4e9302bb5f4;hp=16a9f3a06ed827f3ee7cc2b434a63644059d8791;hpb=b15cd2ee45c5d1dbd58ea3df0becedc43a74ed94;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/structure/ResourcesTest.php b/tests/phpunit/structure/ResourcesTest.php index 16a9f3a06e..9178bdb719 100644 --- a/tests/phpunit/structure/ResourcesTest.php +++ b/tests/phpunit/structure/ResourcesTest.php @@ -12,7 +12,6 @@ * @copyright © 2012, Santhosh Thottingal * @copyright © 2012, Timo Tijhof * - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ class ResourcesTest extends MediaWikiTestCase { @@ -37,6 +36,14 @@ class ResourcesTest extends MediaWikiTestCase { ); } + public function testVersionHash() { + $data = self::getAllModules(); + foreach ( $data['modules'] as $moduleName => $module ) { + $version = $module->getVersionHash( $data['context'] ); + $this->assertEquals( 8, strlen( $version ), "$moduleName must use ResourceLoader::makeHash" ); + } + } + /** * Verify that nothing explicitly depends on the 'jquery' and 'mediawiki' modules. * They are always loaded, depending on them is unsupported and leads to unexpected behaviour.