/** * verify * - the localized value is not set if there is no default value */ public function testBuildOrderItemsMissingOptionDefault() { $handler = $this->getModelMockBuilder('ebayenterprise_order/create_orderitem')->setMethods(['loadOrderItemOptions', 'prepareMerchandisePricing'])->setConstructorArgs([['shipping_helper' => $this->shippingHelper]])->getMock(); $handler->expects($this->any())->method('loadOrderItemOptions')->will($this->returnValue($this->optionValueCollectionStub)); $handler->expects($this->any())->method('prepareMerchandisePricing')->will($this->returnSelf()); // add fake color option value $this->optionValueCollectionStub->addItem(Mage::getModel('eav/entity_attribute_option', ['attribute_code' => 'color', 'option_id' => 15, 'value' => 'Black', 'default_value' => null])); $handler->buildOrderItem($this->payload, $this->itemStub, $this->orderStub, $this->addressStub, 2); $this->assertNull($this->payload->getColor()); $this->assertNull($this->payload->getColorId()); }