Merge "Validate getExamplesMessages() query strings"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 10 Nov 2016 20:50:15 +0000 (20:50 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 10 Nov 2016 20:50:15 +0000 (20:50 +0000)
tests/phpunit/structure/ApiDocumentationTest.php

index 2049e38..bc5a6bd 100644 (file)
@@ -137,6 +137,8 @@ class ApiDocumentationTest extends MediaWikiTestCase {
 
                // Messages for examples.
                foreach ( $module->getExamplesMessages() as $qs => $msg ) {
+                       $this->assertStringStartsNotWith( 'api.php?', $qs,
+                               "Query string must not begin with 'api.php?'" );
                        $this->checkMessage( $msg, "Example $qs" );
                }
        }