6 require __DIR__
. "/../../../maintenance/runJobs.php";
8 class TemplateCategoriesTest
extends MediaWikiLangTestCase
{
10 function testTemplateCategories() {
11 $title = Title
::newFromText( "Categorized from template" );
12 $page = WikiPage
::factory( $title );
14 $user->mRights
= array( 'createpage', 'edit', 'purge' );
16 $page->doEditContent( new WikitextContent( '{{Categorising template}}' ), 'Create a page with a template', 0, false, $user );
19 , $title->getParentCategories()
22 $template = WikiPage
::factory( Title
::newFromText( 'Template:Categorising template' ) );
23 $template->doEditContent( new WikitextContent( '[[Category:Solved bugs]]' ), 'Add a category through a template', 0, false, $user );
26 JobQueueGroup
::destroySingletons();
28 $jobs->loadParamsAndArgs( null, array( 'quiet' => true ), null );
32 array( 'Category:Solved_bugs' => $title->getPrefixedText() )
33 , $title->getParentCategories()