コード例 #1
0
ファイル: BoolTest.php プロジェクト: vituhugo/webservice
 public function test_boolean_values_ONLY_should_return_true()
 {
     $validator = new Bool();
     $this->assertTrue($validator->validate(true));
     $this->assertTrue($validator->validate(false));
     $this->assertTrue($validator->assert(true));
     $this->assertTrue($validator->assert(false));
     $this->assertTrue($validator->check(true));
     $this->assertTrue($validator->check(false));
 }
コード例 #2
0
ファイル: BoolTest.php プロジェクト: 00F100/Validation
 public function testBooleanValuesONLYShouldReturnTrue()
 {
     $validator = new Bool();
     $this->assertTrue($validator->__invoke(''));
     $this->assertTrue($validator->__invoke(true));
     $this->assertTrue($validator->__invoke(false));
     $this->assertTrue($validator->assert(true));
     $this->assertTrue($validator->assert(false));
     $this->assertTrue($validator->check(true));
     $this->assertTrue($validator->check(false));
 }