From 216cf9c692dd7d520a3eefae30951bae03645cfa Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 5 Sep 2012 18:55:19 +0200 Subject: [PATCH] fix spurious failure of TimestampTest Change-Id: Ieadadd5300b10a3de856ffd4128bd9fbb09c417e --- tests/phpunit/includes/TimestampTest.php | 7 +++++++ 1 file changed, 7 insertions(+) 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() ); } -- 2.20.1