예제 #1
0
 /**
  * @expectedException \CatLab\Requirements\Exceptions\PropertyValidationException
  */
 public function testNumberInvalid()
 {
     $property = new MockProperty();
     $property->setType(\CatLab\Requirements\Enums\PropertyType::NUMBER);
     $property->getRequirements()->validate($property, 'abc');
     $property->getRequirements()->validate($property, null);
 }
예제 #2
0
 /**
  * @expectedException \CatLab\Requirements\Exceptions\PropertyValidationException
  */
 public function testMaxValueInvalid()
 {
     $numericProperty = new MockProperty();
     $numericProperty->setType(\CatLab\Requirements\Enums\PropertyType::INTEGER);
     $numericProperty->max(100);
     $numericProperty->getRequirements()->validate($numericProperty, 101);
 }