6 require dirname( __FILE__
) . "/../../../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 $status = $page->doEdit( '{{Categorising template}}', 'Create a page with a template', 0, false, $user );
19 , $title->getParentCategories()
22 $template = WikiPage
::factory( Title
::newFromText( 'Template:Categorising template' ) );
23 $status = $template->doEdit( '[[Category:Solved bugs]]', 'Add a category through a template', 0, false, $user );
27 $jobs->loadParamsAndArgs( null, array( 'quiet' => true ), null );
31 array( 'Category:Solved_bugs' => $title->getPrefixedText() )
32 , $title->getParentCategories()