fix spurious failure of TimestampTest
authordaniel <daniel.kinzler@wikimedia.de>
Wed, 5 Sep 2012 16:55:19 +0000 (18:55 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Wed, 5 Sep 2012 16:55:19 +0000 (18:55 +0200)
Change-Id: Ieadadd5300b10a3de856ffd4128bd9fbb09c417e

tests/phpunit/includes/TimestampTest.php

index 231228f..fd4ceb7 100644 (file)
@@ -43,6 +43,13 @@ class TimestampTest extends MediaWikiTestCase {
         * Test human readable timestamp format.
         */
        function testHumanOutput() {
+               global $wgLang;
+
+               $wgLang = Language::factory( 'es' );
+               $timestamp = new MWTimestamp( time() - 3600 );
+               $this->assertEquals( "hace una hora", $timestamp->getHumanTimestamp()->toString() );
+
+               $wgLang = Language::factory( 'en' );
                $timestamp = new MWTimestamp( time() - 3600 );
                $this->assertEquals( "1 hour ago", $timestamp->getHumanTimestamp()->toString() );
        }