File was renamed from tests/Framework/Shared.php |
| | |
| | | * |
| | | * @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() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 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() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * rcube_shared.inc: slashify() |
| | | * bootstrap.php: slashify() |
| | | */ |
| | | function test_slashify() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * rcube_shared.inc: unslashify() |
| | | * bootstrap.php: unslashify() |
| | | */ |
| | | function test_unslashify() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * rcube_shared.inc: get_offset_sec() |
| | | * bootstrap.php: get_offset_sec() |
| | | */ |
| | | function test_get_offset_sec() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * rcube_shared.inc: array_keys_recursive() |
| | | * bootstrap.php: array_keys_recursive() |
| | | */ |
| | | function test_array_keys_recursive() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * rcube_shared.inc: format_email() |
| | | * bootstrap.php: format_email() |
| | | */ |
| | | function test_format_email() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * rcube_shared.inc: format_email_recipient() |
| | | * bootstrap.php: format_email_recipient() |
| | | */ |
| | | function test_format_email_recipient() |
| | | { |
| | |
| | | } |
| | | |
| | | /** |
| | | * rcube_shared.inc: is_ascii() |
| | | * bootstrap.php: is_ascii() |
| | | */ |
| | | function test_is_ascii() |
| | | { |