diff options
Diffstat (limited to 'tests/phpunit/includes/ParserOptionsTest.php')
-rw-r--r-- | tests/phpunit/includes/ParserOptionsTest.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/phpunit/includes/ParserOptionsTest.php b/tests/phpunit/includes/ParserOptionsTest.php index 58c89146..59c955fe 100644 --- a/tests/phpunit/includes/ParserOptionsTest.php +++ b/tests/phpunit/includes/ParserOptionsTest.php @@ -6,10 +6,9 @@ class ParserOptionsTest extends MediaWikiTestCase { private $pcache; function setUp() { - ParserTest::setUp(); //reuse setup from parser tests global $wgContLang, $wgUser, $wgLanguageCode; $wgContLang = Language::factory( $wgLanguageCode ); - $this->popts = new ParserOptions( $wgUser ); + $this->popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang ); $this->pcache = ParserCache::singleton(); } @@ -26,11 +25,11 @@ class ParserOptionsTest extends MediaWikiTestCase { $wgUseDynamicDates = true; $title = Title::newFromText( "Some test article" ); - $article = new Article( $title ); + $page = WikiPage::factory( $title ); - $pcacheKeyBefore = $this->pcache->getKey( $article, $this->popts ); + $pcacheKeyBefore = $this->pcache->getKey( $page, $this->popts ); $this->assertNotNull( $this->popts->getDateFormat() ); - $pcacheKeyAfter = $this->pcache->getKey( $article, $this->popts ); + $pcacheKeyAfter = $this->pcache->getKey( $page, $this->popts ); $this->assertEquals( $pcacheKeyBefore, $pcacheKeyAfter ); } } |