diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /tests/phpunit/includes/TemplateCategoriesTest.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
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
Diffstat (limited to 'tests/phpunit/includes/TemplateCategoriesTest.php')
-rw-r--r-- | tests/phpunit/includes/TemplateCategoriesTest.php | 16 |
1 files changed, 7 insertions, 9 deletions
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; |