From: Brad Jorsch Date: Tue, 8 Nov 2016 21:29:04 +0000 (-0500) Subject: Validate getExamplesMessages() query strings X-Git-Tag: 1.31.0-rc.0~4894^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=af1dfeead5406acc3fcdf8d13eb0997b343cb898;p=lhc%2Fweb%2Fwiklou.git Validate getExamplesMessages() query strings Assert that they don't begin with 'api.php?'. Change-Id: Idf5e8e08863a379a37a427a11936e5f9ce567396 Depends-On: I8a82eecefbb0ba327d8e8bc24ec535bcf40e6429 Depends-On: I476aad09655a2822381a2c61690b4b0ad423151e --- diff --git a/tests/phpunit/structure/ApiDocumentationTest.php b/tests/phpunit/structure/ApiDocumentationTest.php index 2049e38ba0..bc5a6bd6c7 100644 --- a/tests/phpunit/structure/ApiDocumentationTest.php +++ b/tests/phpunit/structure/ApiDocumentationTest.php @@ -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" ); } }