summaryrefslogtreecommitdiff
path: root/tests/Framework
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-28 21:26:44 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-28 21:26:44 +0200
commit896e2b4e5193af26f7bfe8ad96f7a90b8d96c35e (patch)
tree71ffd86808436ec2ce059d7df3a333a6d9d63f3e /tests/Framework
parent5383ad72dbe4f722b124f5b697e258ccb11c3c8c (diff)
Add more rcube_utils tests
Diffstat (limited to 'tests/Framework')
-rw-r--r--tests/Framework/Utils.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index c62e688eb..abfb7cb65 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -262,4 +262,36 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
$this->assertSame($v[2], $result);
}
}
+
+ /**
+ * rcube:utils::strtotime()
+ */
+ function test_strtotime()
+ {
+ $test = array(
+ '1' => 1,
+ '' => 0,
+ );
+
+ foreach ($test as $datetime => $ts) {
+ $result = rcube_utils::strtotime($datetime);
+ $this->assertSame($ts, $result);
+ }
+ }
+
+ /**
+ * rcube:utils::normalize _string()
+ */
+ function test_normalize_string()
+ {
+ $test = array(
+ '' => '',
+ 'abc def' => 'abc def',
+ );
+
+ foreach ($test as $input => $output) {
+ $result = rcube_utils::normalize_string($input);
+ $this->assertSame($output, $result);
+ }
+ }
}