From: Andreas Fischer Date: Fri, 9 Aug 2013 20:28:03 +0000 (+0200) Subject: Add datetime test for numeric string. X-Git-Tag: v6.0.0alpha2~333^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b6b1bc5d09e1b4d4848ae99e0963217f92ad151c;p=nextcloud-server.git Add datetime test for numeric string. --- diff --git a/tests/lib/l10n.php b/tests/lib/l10n.php index dfc5790c2e7..bd5984add15 100644 --- a/tests/lib/l10n.php +++ b/tests/lib/l10n.php @@ -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')); + } }