Use WikiPage instead of Article to call doEdit() and getId()
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 6 Feb 2012 11:19:14 +0000 (11:19 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 6 Feb 2012 11:19:14 +0000 (11:19 +0000)
tests/phpunit/includes/search/SearchEngineTest.php

index c1bf134..957907c 100644 (file)
@@ -93,10 +93,10 @@ class SearchEngineTest extends MediaWikiTestCase {
                // avoid memory leak...?
                LinkCache::singleton()->clear();
 
-               $article = new Article( $title );
-               $article->doEdit( $text, $comment, 0, false, $user );
+               $page = WikiPage::factory( $title );
+               $page->doEdit( $text, $comment, 0, false, $user );
 
-               $this->pageList[] = array( $title, $article->getId() );
+               $this->pageList[] = array( $title, $page->getId() );
 
                return true;
        }