Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/277457

Change subject: resourceloader: Add structure unit test to confirm messages 
exist
......................................................................

resourceloader: Add structure unit test to confirm messages exist

Change-Id: I5333523efe3e7b9191e871d67d9eb650002c7784
---
M tests/phpunit/structure/ResourcesTest.php
1 file changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/277457/1

diff --git a/tests/phpunit/structure/ResourcesTest.php 
b/tests/phpunit/structure/ResourcesTest.php
index 5c65c1e..d45f5f9 100644
--- a/tests/phpunit/structure/ResourcesTest.php
+++ b/tests/phpunit/structure/ResourcesTest.php
@@ -87,6 +87,25 @@
        }
 
        /**
+        * Verify that all specified messages actually exist.
+        */
+       public function testMissingMessages() {
+               $data = self::getAllModules();
+               $validDeps = array_keys( $data['modules'] );
+               $lang = Language::factory( 'en' );
+
+               /** @var ResourceLoaderModule $module */
+               foreach ( $data['modules'] as $moduleName => $module ) {
+                       foreach ( $module->getMessages() as $msgKey ) {
+                               $this->assertTrue(
+                                       wfMessage( $msgKey )->useDatabase( 
false )->inLanguage( $lang )->exists(),
+                                       "Message '$msgKey' required by 
'$moduleName' must exist"
+                               );
+                       }
+               }
+       }
+
+       /**
         * Verify that all dependencies of all modules are always satisfiable 
with the 'targets' defined
         * for the involved modules.
         *

-- 
To view, visit https://gerrit.wikimedia.org/r/277457
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5333523efe3e7b9191e871d67d9eb650002c7784
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to