Example #1
0
 public function testBoolType()
 {
     $bool = new BoolType();
     $this->assertTrue($bool->test('true'));
     $this->assertTrue($bool->test('false'));
     $this->assertTrue($bool->test('0'));
     $this->assertTrue($bool->test('1'));
     $this->assertFalse($bool->test('foo'));
     $this->assertFalse($bool->test('123'));
 }
Example #2
0
 /**
  * @dataProvider falseValueProvider
  */
 public function testFalseBoolTypeParse($str)
 {
     $bool = new BoolType();
     $this->assertFalse($bool->parse($str));
 }