diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-08-24 18:08:54 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-08-24 18:08:54 +0200 |
commit | b32fab16efb715568f54781bcc9e14e30ce41bff (patch) | |
tree | b3100876482e70d7cd865c3676f29b86df546ece /tests | |
parent | 9f754494e74396469ff6ceb34ece25b088756ffa (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.php | 10 |
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"); } } |