Add datetime test for numeric string.

This commit is contained in:
Andreas Fischer 2013-08-09 22:28:03 +02:00
parent 43be3eb4d0
commit b6b1bc5d09
1 changed files with 7 additions and 0 deletions

View File

@ -52,4 +52,11 @@ class Test_L10n extends PHPUnit_Framework_TestCase {
$this->assertEquals('5 oken', (string)$l->n('%n window', '%n windows', 5));
}
/**
* Issue #4360: Do not call strtotime() on numeric strings.
*/
public function testNumericStringToDateTime() {
$l = new OC_L10N('test');
$this->assertSame('February 13, 2009 23:31', $l->l('datetime', '1234567890'));
}
}