function it_sets_attribute_when_new_value_is_different_from_product_value($builder, AttributeInterface $attribute, ProductInterface $product, FamilyInterface $family, ProductValue $productValue) { $family->getAttributeCodes()->willReturn(['sku', 'is_color']); $product->getFamily()->willReturn($family); $attribute->getCode()->willReturn('is_color'); $product->getValue('is_color', null, null)->willReturn(null); $builder->addProductValue($product, $attribute, null, null)->willReturn($productValue); $this->setAttributeData($product, $attribute, true, ['locale' => null, 'scope' => null]); }