*/
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() );
}
/**