Index: trunk/phase3/tests/phpunit/includes/ParserOptionsTest.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | function setUp() { |
10 | 10 | global $wgContLang, $wgUser, $wgLanguageCode; |
11 | 11 | $wgContLang = Language::factory( $wgLanguageCode ); |
12 | | - $this->popts = new ParserOptions( $wgUser ); |
| 12 | + $this->popts = ParserOptions::newFromUserAndLang( $wgUser, $wgContLang ); |
13 | 13 | $this->pcache = ParserCache::singleton(); |
14 | 14 | } |
15 | 15 | |
— | — | @@ -25,11 +25,11 @@ |
26 | 26 | $wgUseDynamicDates = true; |
27 | 27 | |
28 | 28 | $title = Title::newFromText( "Some test article" ); |
29 | | - $article = new Article( $title ); |
| 29 | + $page = WikiPage::factory( $title ); |
30 | 30 | |
31 | | - $pcacheKeyBefore = $this->pcache->getKey( $article, $this->popts ); |
| 31 | + $pcacheKeyBefore = $this->pcache->getKey( $page, $this->popts ); |
32 | 32 | $this->assertNotNull( $this->popts->getDateFormat() ); |
33 | | - $pcacheKeyAfter = $this->pcache->getKey( $article, $this->popts ); |
| 33 | + $pcacheKeyAfter = $this->pcache->getKey( $page, $this->popts ); |
34 | 34 | $this->assertEquals( $pcacheKeyBefore, $pcacheKeyAfter ); |
35 | 35 | } |
36 | 36 | } |