Merge "Slight improvements to FormSpecialPage behavior."
[lhc/web/wiklou.git] / tests / phpunit / includes / TimestampTest.php
index 2d550bc..07dcb7d 100644 (file)
@@ -3,16 +3,12 @@
 /**
  * Tests timestamp parsing and output.
  */
-class TimestampTest extends MediaWikiTestCase {
+class TimestampTest extends MediaWikiLangTestCase {
 
        protected function setUp() {
                parent::setUp();
 
-               $this->setMwGlobals( array(
-                       'wgLanguageCode' => 'en',
-                       'wgContLang' => Language::factory( 'en' ),
-                       'wgLang' => Language::factory( 'en' ),
-               ) );
+               RequestContext::getMain()->setLanguage( Language::factory( 'en' ) );
        }
 
        /**
@@ -38,7 +34,7 @@ class TimestampTest extends MediaWikiTestCase {
         * @expectedException TimestampException
         */
        function testInvalidParse() {
-               $timestamp = new MWTimestamp( "This is not a timestamp." );
+               new MWTimestamp( "This is not a timestamp." );
        }
 
        /**