8 class ApiQueryAllPagesTest
extends ApiTestCase
{
10 protected function setUp() {
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(
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' );