function it_generates_a_query_to_update_product_select_attributes($namingUtility, AttributeOptionValue $bleu, AttributeOption $blue, AbstractAttribute $color) { $bleu->getOption()->willReturn($blue); $bleu->getLocale()->willReturn('fr_FR'); $blue->getAttribute()->willReturn($color); $namingUtility->getAttributeNormFields($color)->willReturn(['normalizedData.color-fr_FR', 'normalizedData.color-en_US']); $blue->getCode()->willReturn('blue'); $this->generateQuery($bleu, 'value', 'Bleu', 'Bleus')->shouldReturn([[['normalizedData.color-fr_FR' => ['$elemMatch' => ['code' => 'blue']]], ['$set' => ['normalizedData.color-fr_FR.$.optionValues.fr_FR.value' => 'Bleus']], ['multiple' => true]], [['normalizedData.color-en_US' => ['$elemMatch' => ['code' => 'blue']]], ['$set' => ['normalizedData.color-en_US.$.optionValues.fr_FR.value' => 'Bleus']], ['multiple' => true]]]); }
/** * {@inheritDoc} */ public function getOption() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOption', array()); return parent::getOption(); }