summaryrefslogtreecommitdiff
path: root/tests/Framework/Utils.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-27 09:13:13 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-27 09:13:13 +0100
commit0c82e95c59ab7a5823c69fcbc4f1b2745b7b86f9 (patch)
treeda5a1f7e07e959baebcb81dcddef99e3de32ef78 /tests/Framework/Utils.php
parenta92beb6bdb9cb857e8cee6606033691f11692230 (diff)
Apply rcube_shared.inc -> bootstrap.php change in tests
Diffstat (limited to 'tests/Framework/Utils.php')
-rw-r--r--tests/Framework/Utils.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/Framework/Utils.php b/tests/Framework/Utils.php
index ec61c5d4b..7c1e92ac8 100644
--- a/tests/Framework/Utils.php
+++ b/tests/Framework/Utils.php
@@ -206,4 +206,27 @@ class Framework_Utils extends PHPUnit_Framework_TestCase
$this->assertSame(explode(',', $text), $result);
}
}
+
+ /**
+ * rcube_utils::get_boolean()
+ */
+ function test_get_boolean()
+ {
+ $input = array(
+ false, 'false', '0', 'no', 'off', 'nein', 'FALSE', '', null,
+ );
+
+ foreach ($input as $idx => $value) {
+ $this->assertFalse(get_boolean($value), "Invalid result for $idx test item");
+ }
+
+ $input = array(
+ true, 'true', '1', 1, 'yes', 'anything', 1000,
+ );
+
+ foreach ($input as $idx => $value) {
+ $this->assertTrue(get_boolean($value), "Invalid result for $idx test item");
+ }
+ }
+
}