public function testErrorsIfAssertionIsValid() { $property = new entity\property\Property('car'); $property->addPropertyRule(new \dicom\workflow\rules\AlwaysTrueRule()); $executionResult = $property->executeRules('4 wheel', '4 wheel', $errors = []); static::assertTrue($executionResult->isSuccess()); }
protected function createTestGirl() { $boobsSize = new Property('boobsSize'); $greaterThenRule = new GreaterThan(); $greaterThenRule->setConfig(2); $boobsSize->addPropertyRule($greaterThenRule); $prettyFace = new Property('prettyFace'); $prettyFace->addPropertyRule(new AlwaysTrueRule()); $girl = new CompositeProperty('girl'); $girl->addProperty($boobsSize); $girl->addProperty($prettyFace); return $girl; }