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 );
23 $page->doEdit( 'Some text', 'inserting content' );
25 $result = $this->doApiRequest( array(
28 'apnamespace' => NS_CATEGORY
,
29 'apprefix' => 'Template:x' ) );
31 $this->assertArrayHasKey( 'query', $result[0] );
32 $this->assertArrayHasKey( 'allpages', $result[0]['query'] );
33 $this->assertNotEquals( 0, count( $result[0]['query']['allpages'] ),
34 'allpages list does not contain page Category:Template:xyz' );