From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- tests/phpunit/includes/TemplateCategoriesTest.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'tests/phpunit/includes/TemplateCategoriesTest.php') diff --git a/tests/phpunit/includes/TemplateCategoriesTest.php b/tests/phpunit/includes/TemplateCategoriesTest.php index de9d6dc6..39ce6e31 100644 --- a/tests/phpunit/includes/TemplateCategoriesTest.php +++ b/tests/phpunit/includes/TemplateCategoriesTest.php @@ -3,26 +3,24 @@ /** * @group Database */ -require dirname( __FILE__ ) . "/../../../maintenance/runJobs.php"; +require __DIR__ . "/../../../maintenance/runJobs.php"; class TemplateCategoriesTest extends MediaWikiLangTestCase { function testTemplateCategories() { - global $wgUser; - $title = Title::newFromText( "Categorized from template" ); - $article = new Article( $title ); - $wgUser = new User(); - $wgUser->mRights['*'] = array( 'createpage', 'edit', 'purge' ); + $page = WikiPage::factory( $title ); + $user = new User(); + $user->mRights = array( 'createpage', 'edit', 'purge' ); - $status = $article->doEdit( '{{Categorising template}}', 'Create a page with a template', 0 ); + $status = $page->doEdit( '{{Categorising template}}', 'Create a page with a template', 0, false, $user ); $this->assertEquals( array() , $title->getParentCategories() ); - $template = new Article( Title::newFromText( 'Template:Categorising template' ) ); - $status = $template->doEdit( '[[Category:Solved bugs]]', 'Add a category through a template', 0 ); + $template = WikiPage::factory( Title::newFromText( 'Template:Categorising template' ) ); + $status = $template->doEdit( '[[Category:Solved bugs]]', 'Add a category through a template', 0, false, $user ); // Run the job queue $jobs = new RunJobs; -- cgit v1.2.2