function it_does_not_validate_with_empty_value(ProductRepositoryInterface $productRepository, ProductValueInterface $value, ExecutionContextInterface $context, Constraint $constraint) { $productRepository->valueExists($value)->shouldNotBeCalled(); $context->buildViolation(Argument::any())->shouldNotBeCalled(); $this->validate("", $constraint)->shouldReturn(null); }
/** * @param ProductValueInterface $productValue * * @return bool */ protected function alreadyExists(ProductValueInterface $productValue) { return $this->repository->valueExists($productValue); }