Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
[mediawiki.git] / tests / phpunit / includes / api / ApiQueryAllPagesTest.php
blob124988f32f6e7679ba4525a22e8ea279a6b21a22
1 <?php
3 /**
4 * @group API
5 * @group Database
6 * @group medium
7 */
8 class ApiQueryAllPagesTest extends ApiTestCase {
10 protected function setUp() {
11 parent::setUp();
12 $this->doLogin();
15 /**
16 * @todo give this test a real name explaining what is being tested here
18 public function testBug25702() {
19 $title = Title::newFromText( 'Category:Template:xyz' );
20 $page = WikiPage::factory( $title );
21 $page->doEdit( 'Some text', 'inserting content' );
23 $result = $this->doApiRequest( array(
24 'action' => 'query',
25 'list' => 'allpages',
26 'apnamespace' => NS_CATEGORY,
27 'apprefix' => 'Template:x' ) );
29 $this->assertArrayHasKey( 'query', $result[0] );
30 $this->assertArrayHasKey( 'allpages', $result[0]['query'] );
31 $this->assertNotEquals( 0, count( $result[0]['query']['allpages'] ),
32 'allpages list does not contain page Category:Template:xyz' );