Exemplo n.º 1
0
 /**
  * @magentoDbIsolation enabled
  */
 public function testSetBillingAddress()
 {
     $addressData = $this->_getValidAddressData();
     /** Validate data before creating address object */
     $this->_model->setIsValidate(true)->setBillingAddress($addressData);
     $this->assertInstanceOf('Magento\\Quote\\Model\\Quote\\Address', $this->_model->getBillingAddress(), 'Billing address object was not created.');
     $expectedAddressData = array_merge($addressData, ['address_type' => 'billing', 'quote_id' => $this->_model->getQuote()->getId(), 'street' => "Line1\nLine2", 'save_in_address_book' => 0, 'region' => '', 'region_id' => 1]);
     $this->assertEquals($expectedAddressData, $this->_model->getBillingAddress()->getData(), 'Created billing address is invalid.');
 }