Beispiel #1
0
 function isValid($value)
 {
     $nameValidator = new C3op_Util_ValidInteger();
     return $nameValidator->isValid($value) && $value >= 0;
 }
Beispiel #2
0
 public function testThatAStringValueIsNotValid()
 {
     $validator = new C3op_Util_ValidInteger();
     $notANumber = "one two três quatorze";
     $this->assertFalse($validator->isValid($notANumber));
 }