diff options
Diffstat (limited to 'www/wiki/extensions/Translate/tests/phpunit/ResourcesOrderTest.php')
-rw-r--r-- | www/wiki/extensions/Translate/tests/phpunit/ResourcesOrderTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/www/wiki/extensions/Translate/tests/phpunit/ResourcesOrderTest.php b/www/wiki/extensions/Translate/tests/phpunit/ResourcesOrderTest.php new file mode 100644 index 00000000..0f265201 --- /dev/null +++ b/www/wiki/extensions/Translate/tests/phpunit/ResourcesOrderTest.php @@ -0,0 +1,29 @@ +<?php +/** + * Code hygiene test. + * + * @file + * @author Niklas Laxström + * @copyright Copyright © 2012-2013, Niklas Laxström + * @license GPL-2.0+ + */ + +class ResourcesOrderTest extends MediaWikiTestCase { + public function setUp() { + parent::setUp(); + $this->setMwGlobals( 'wgResourceModules', array() ); + } + + public function testAlphabeticalOrder() { + require __DIR__ . '/../../Resources.php'; + + $sorted = $wgResourceModules; + ksort( $sorted ); + + $this->assertEquals( + array_keys( $sorted ), + array_keys( $wgResourceModules ), + 'Modules are defined in alphabetical order.' + ); + } +} |