public static function isBool($str) { $str = strtoupper($str); return $str === 'TRUE' || $str === 'FALSE'; }
public function testIsBool() { $this->assertTrue(Context::isBool('true')); $this->assertTrue(Context::isBool('false')); $this->assertFalse(Context::isBool('tru')); $this->assertFalse(Context::isBool('falsee')); }