Skip to content
Snippets Groups Projects
Commit 0e3dea71 authored by Thomas Müller's avatar Thomas Müller
Browse files

adding test case for a numeric value

parent b6b1bc5d
No related branches found
No related tags found
No related merge requests found
...@@ -53,10 +53,15 @@ class Test_L10n extends PHPUnit_Framework_TestCase { ...@@ -53,10 +53,15 @@ class Test_L10n extends PHPUnit_Framework_TestCase {
} }
/** /**
* Issue #4360: Do not call strtotime() on numeric strings. * Issue #4360: Do not call strtotime() on numeric strings.
*/ */
public function testNumericStringToDateTime() { public function testNumericStringToDateTime() {
$l = new OC_L10N('test'); $l = new OC_L10N('test');
$this->assertSame('February 13, 2009 23:31', $l->l('datetime', '1234567890')); $this->assertSame('February 13, 2009 23:31', $l->l('datetime', '1234567890'));
} }
public function testNumericToDateTime() {
$l = new OC_L10N('test');
$this->assertSame('February 13, 2009 23:31', $l->l('datetime', 1234567890));
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment