public static function boolean($value)
{
$boolean = array(0, 1, '0', '1', true, false);
return in_array($value, $boolean, true);
}
/** * @testdox boolean should return false to true as string */ public function testInvalidBooleanWithTrue() { $value = 'true'; $this->assertFalse(Validation::boolean($value)); }