]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add datetime test for numeric string.
authorAndreas Fischer <bantu@owncloud.com>
Fri, 9 Aug 2013 20:28:03 +0000 (22:28 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Fri, 9 Aug 2013 20:32:38 +0000 (22:32 +0200)
tests/lib/l10n.php

index dfc5790c2e75a369c4fe26e8314ca61f4d7c86b0..bd5984add15cc1fafec43c2f1b66f480c7ead99e 100644 (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'));
+       }
 }