summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-08-09 22:28:03 +0200
committerAndreas Fischer <bantu@owncloud.com>2013-08-09 22:32:38 +0200
commitb6b1bc5d09e1b4d4848ae99e0963217f92ad151c (patch)
treeba2f87075053d7fc25ad8a32acc944aa9d8a6338 /tests/lib
parent43be3eb4d0112215f03157c81f9f94e03009718f (diff)
downloadnextcloud-server-b6b1bc5d09e1b4d4848ae99e0963217f92ad151c.tar.gz
nextcloud-server-b6b1bc5d09e1b4d4848ae99e0963217f92ad151c.zip
Add datetime test for numeric string.
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/l10n.php7
1 files changed, 7 insertions, 0 deletions
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'));
+ }
}