Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function validate(FeatureInterface $feature, $featureValue, $validatedValue)
 {
     $constraint = $this->constraintFactory->getConstraint($feature->getType());
     return $constraint->validate($feature, $featureValue, $validatedValue);
 }
 function it_should_use_factory_object(FeatureInterface $boolFeature, ConstraintFactoryInterface $constraintFactory)
 {
     $bf = $boolFeature->getWrappedObject();
     $constraintFactory->getConstraint($bf->getType())->shouldBeCalled();
     $this->validate($boolFeature, null, null);
 }