8 class ApiQueryAllPagesTest
extends ApiTestCase
{
10 protected function setUp() {
17 *Prefixes of API search requests are not handled with case sensitivity and may result
18 *in wrong search results
20 public function testPrefixNormalizationSearchBug() {
21 $title = Title
::newFromText( 'Category:Template:xyz' );
22 $page = WikiPage
::factory( $title );
25 ContentHandler
::makeContent( 'Some text', $page->getTitle() ),
29 $result = $this->doApiRequest( [
32 'apnamespace' => NS_CATEGORY
,
33 'apprefix' => 'Template:x' ] );
35 $this->assertArrayHasKey( 'query', $result[0] );
36 $this->assertArrayHasKey( 'allpages', $result[0]['query'] );
37 $this->assertNotEquals( 0, count( $result[0]['query']['allpages'] ),
38 'allpages list does not contain page Category:Template:xyz' );