summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-24 18:08:54 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-24 18:08:54 +0200
commitb32fab16efb715568f54781bcc9e14e30ce41bff (patch)
treeb3100876482e70d7cd865c3676f29b86df546ece /tests
parent9f754494e74396469ff6ceb34ece25b088756ffa (diff)
Fix handling of non-default date formats (#1489294)
- remove ambiguous m/d/Y format from default config
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/Utils.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index abfb7cb65..3f7f48c3a 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -271,11 +271,19 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
$test = array(
'1' => 1,
'' => 0,
+ '2013-04-22' => 1366581600,
+ '2013/04/22' => 1366581600,
+ '2013.04.22' => 1366581600,
+ '22-04-2013' => 1366581600,
+ '22/04/2013' => 1366581600,
+ '22.04.2013' => 1366581600,
+ '22.4.2013' => 1366581600,
+ '20130422' => 1366581600,
);
foreach ($test as $datetime => $ts) {
$result = rcube_utils::strtotime($datetime);
- $this->assertSame($ts, $result);
+ $this->assertSame($ts, $result, "Error parsing date: $datetime");
}
}