From: daniel Date: Wed, 5 Sep 2012 16:55:19 +0000 (+0200) Subject: fix spurious failure of TimestampTest X-Git-Tag: 1.31.0-rc.0~22097^2^2~26^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=216cf9c692dd7d520a3eefae30951bae03645cfa;p=lhc%2Fweb%2Fwiklou.git fix spurious failure of TimestampTest Change-Id: Ieadadd5300b10a3de856ffd4128bd9fbb09c417e --- diff --git a/tests/phpunit/includes/TimestampTest.php b/tests/phpunit/includes/TimestampTest.php index 231228f55f..fd4ceb7257 100644 --- a/tests/phpunit/includes/TimestampTest.php +++ b/tests/phpunit/includes/TimestampTest.php @@ -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() ); }