Merge "(bug 17808) (bug 21167) use real links for search suggestions"
[lhc/web/wiklou.git] / tests / phpunit / includes / TimestampTest.php
index 6352160..d7da0db 100644 (file)
@@ -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() );
        }
 
        /**