コード例 #1
0
ファイル: AddressTest.php プロジェクト: aiesh/magento2
 /**
  * same_as_billing must be equal 0 if customer has default shipping address that differs from default billing
  *
  * @param bool $unsetId
  * @dataProvider unsetAddressIdDataProvider
  * @magentoDbIsolation enabled
  */
 public function testSameAsBillingWhenCustomerHasDefaultShippingAddress($unsetId)
 {
     $this->_customer->setDefaultShipping(2)->save();
     // we should save the customer data in order to be able to use it
     $this->_quote->setCustomer($this->_customer);
     $this->_setCustomerAddressAndSave($unsetId);
     $sameAsBilling = $this->_quote->getShippingAddress()->getSameAsBilling();
     $this->assertEquals(0, $sameAsBilling);
 }