function it_has_attribute_in_a_variant_group_template(AttributeInterface $attribute, GroupInterface $group, GroupTypeInterface $groupType, ArrayCollection $groupAttributes, ProductTemplateInterface $template) { $groupType->isVariant()->willReturn(true); $groupAttributes->contains($attribute)->willReturn(false); $template->hasValueForAttribute($attribute)->shouldBeCalled()->willReturn(true); $group->getType()->willReturn($groupType); $group->getProductTemplate()->willReturn($template); $group->getAxisAttributes()->willReturn($groupAttributes); $group->addProduct($this)->willReturn($this); $this->addGroup($group); $this->hasAttributeInVariantGroup($attribute)->shouldReturn(true); }