Esempio n. 1
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);
 }
Esempio n. 2
0
 public function testDynamicAppend()
 {
     $root = new MockProperty('root');
     $this->assertInstanceOf('exemel\\Property', $root->append_child('value'));
     $child = new exemel\Property('child', 'value');
     $this->assertEquals($child, $root->children[0]);
 }
 /**
  * @expectedException \CatLab\Requirements\Exceptions\PropertyValidationException
  */
 public function testInvalidValidString()
 {
     $property = new MockProperty();
     $property->object();
     $property->getRequirements()->validate($property, 'foobar');
 }