X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FTimestampTest.php;h=d7da0dbe18f08248ee206f21c07bff829d46dd56;hb=54bd7598d6222c04d191def490a0f71d1f81870a;hp=6352160b2cd7df49074c5db07515ee81a236ff3c;hpb=9960ee26512eef4217caeca3619e5146749fbec5;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/TimestampTest.php b/tests/phpunit/includes/TimestampTest.php index 6352160b2c..d7da0dbe18 100644 --- a/tests/phpunit/includes/TimestampTest.php +++ b/tests/phpunit/includes/TimestampTest.php @@ -55,6 +55,10 @@ class TimestampTest extends MediaWikiTestCase { function testHumanOutput() { $timestamp = new MWTimestamp( time() - 3600 ); $this->assertEquals( "1 hour ago", $timestamp->getHumanTimestamp()->inLanguage( 'en' )->text() ); + $timestamp = new MWTimestamp( time() - 5184000 ); + $this->assertEquals( "2 months ago", $timestamp->getHumanTimestamp()->inLanguage( 'en' )->text() ); + $timestamp = new MWTimestamp( time() - 31536000 ); + $this->assertEquals( "1 year ago", $timestamp->getHumanTimestamp()->inLanguage( 'en' )->text() ); } /**