spec\Sylius\Bundle\ProductBundle\Validator\UniqueSimpleProductCodeValidatorSpec::it_does_not_add_violation_if_product_is_configurable PHP Метод

it_does_not_add_violation_if_product_is_configurable() публичный Метод

public it_does_not_add_violation_if_product_is_configurable ( Symfony\Component\Validator\Context\ExecutionContextInterface $context, Sylius\Component\Product\Model\ProductInterface $product )
$context Symfony\Component\Validator\Context\ExecutionContextInterface
$product Sylius\Component\Product\Model\ProductInterface
    function it_does_not_add_violation_if_product_is_configurable(ExecutionContextInterface $context, ProductInterface $product)
    {
        $constraint = new UniqueSimpleProductCode(['message' => 'Simple product code has to be unique']);
        $product->isSimple()->willReturn(false);
        $context->buildViolation(Argument::any())->shouldNotBeCalled();
        $this->validate($product, $constraint);
    }