Merge "(bug 17808) (bug 21167) use real links for search suggestions"
[lhc/web/wiklou.git] / tests / phpunit / includes / TimestampTest.php
index 53d0424..d7da0db 100644 (file)
@@ -54,7 +54,11 @@ class TimestampTest extends MediaWikiTestCase {
         */
        function testHumanOutput() {
                $timestamp = new MWTimestamp( time() - 3600 );
-               $this->assertEquals( "1 hour ago", $timestamp->getHumanTimestamp()->toString() );
+               $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() );
        }
 
        /**