summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/Bootstrap.php (renamed from tests/Framework/Shared.php)42
-rw-r--r--tests/Framework/Utils.php23
-rw-r--r--tests/phpunit.xml2
3 files changed, 34 insertions, 33 deletions
diff --git a/tests/Framework/Shared.php b/tests/Framework/Bootstrap.php
index 0394cd025..d18fd371b 100644
--- a/tests/Framework/Shared.php
+++ b/tests/Framework/Bootstrap.php
@@ -5,11 +5,11 @@
*
* @package Tests
*/
-class Framework_Shared extends PHPUnit_Framework_TestCase
+class Framework_Bootstrap extends PHPUnit_Framework_TestCase
{
/**
- * rcube_shared.inc: in_array_nocase()
+ * bootstrap.php: in_array_nocase()
*/
function test_in_array_nocase()
{
@@ -25,29 +25,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: 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");
- }
- }
-
- /**
- * rcube_shared.inc: parse_bytes()
+ * bootstrap.php: parse_bytes()
*/
function test_parse_bytes()
{
@@ -75,7 +53,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: slashify()
+ * bootstrap.php: slashify()
*/
function test_slashify()
{
@@ -94,7 +72,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: unslashify()
+ * bootstrap.php: unslashify()
*/
function test_unslashify()
{
@@ -115,7 +93,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: get_offset_sec()
+ * bootstrap.php: get_offset_sec()
*/
function test_get_offset_sec()
{
@@ -138,7 +116,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: array_keys_recursive()
+ * bootstrap.php: array_keys_recursive()
*/
function test_array_keys_recursive()
{
@@ -160,7 +138,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: format_email()
+ * bootstrap.php: format_email()
*/
function test_format_email()
{
@@ -180,7 +158,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: format_email_recipient()
+ * bootstrap.php: format_email_recipient()
*/
function test_format_email_recipient()
{
@@ -202,7 +180,7 @@ class Framework_Shared extends PHPUnit_Framework_TestCase
}
/**
- * rcube_shared.inc: is_ascii()
+ * bootstrap.php: is_ascii()
*/
function test_is_ascii()
{
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");
+ }
+ }
+
}
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index 2e52b7795..36ab6d714 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -4,6 +4,7 @@
<testsuites>
<testsuite name="All Tests">
<file>Framework/BaseReplacer.php</file>
+ <file>Framework/Bootstrap.php</file>
<file>Framework/Browser.php</file>
<file>Framework/Cache.php</file>
<file>Framework/Charset.php</file>
@@ -20,7 +21,6 @@
<file>Framework/ResultIndex.php</file>
<file>Framework/ResultSet.php</file>
<file>Framework/ResultThread.php</file>
- <file>Framework/Shared.php</file>
<file>Framework/Smtp.php</file>
<file>Framework/Spellchecker.php</file>
<file>Framework/StringReplacer.php</file>