X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiQueryAllPagesTest.php;h=3b21ff888df6a2e1f5f1b72a2ccf6f239b946097;hb=f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b;hp=bc08afe06696f9923068df21ce1e686e705017dc;hpb=ea68eb36f24767bcbbf0eba2f6998764b9892f7c;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiQueryAllPagesTest.php b/tests/phpunit/includes/api/ApiQueryAllPagesTest.php index bc08afe066..3b21ff888d 100644 --- a/tests/phpunit/includes/api/ApiQueryAllPagesTest.php +++ b/tests/phpunit/includes/api/ApiQueryAllPagesTest.php @@ -6,21 +6,27 @@ * @group medium */ class ApiQueryAllPagesTest extends ApiTestCase { + protected function setUp() { parent::setUp(); $this->doLogin(); } - function testBug25702() { + /** + *Test bug 25702 + *Prefixes of API search requests are not handled with case sensitivity and may result + *in wrong search results + */ + public function testPrefixNormalizationSearchBug() { $title = Title::newFromText( 'Category:Template:xyz' ); $page = WikiPage::factory( $title ); $page->doEdit( 'Some text', 'inserting content' ); - $result = $this->doApiRequest( array( + $result = $this->doApiRequest( [ 'action' => 'query', 'list' => 'allpages', 'apnamespace' => NS_CATEGORY, - 'apprefix' => 'Template:x' ) ); + 'apprefix' => 'Template:x' ] ); $this->assertArrayHasKey( 'query', $result[0] ); $this->assertArrayHasKey( 'allpages', $result[0]['query'] );