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