Aleksander Machniak
2012-11-27 0c82e95c59ab7a5823c69fcbc4f1b2745b7b86f9
tests/Framework/Utils.php
@@ -206,4 +206,27 @@
            $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");
        }
    }
}