function it_does_not_add_violation_when_validates_string_product_value($context, IsString $stringConstraint, ProductValueInterface $productValue, AttributeInterface $attribute) { $productValue->getAttribute()->willReturn($attribute); $attribute->getCode()->willReturn('foo'); $attribute->getBackendType()->willReturn('varchar'); $productValue->getVarchar()->willReturn('bar'); $context->buildViolation(Argument::cetera())->shouldNotBeCalled(); $this->validate($productValue, $stringConstraint); }