Skip to content

Commit

Permalink
#26107: Exception message on cart with no shipment items
Browse files Browse the repository at this point in the history
  • Loading branch information
michalderlatka committed Jun 26, 2020
1 parent 1e8bbc6 commit 1091a30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Quote/Model/ShippingAddressManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function assign($cartId, \Magento\Quote\Api\Data\AddressInterface $addres
$quote = $this->quoteRepository->getActive($cartId);
if ($quote->isVirtual()) {
throw new NoSuchEntityException(
__('The Cart includes virtual product(s) only, so a shipping address is not used.')
__('Shipping address is not allowed on cart: cart contains no items for shipment.')
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function testSetNewShippingAddressOnCartWithSimpleProduct()
public function testSetNewShippingAddressOnCartWithVirtualProduct()
{
$this->expectException(\Exception::class);
$this->expectExceptionMessage('The Cart includes virtual product(s) only, so a shipping address is not used.');
$this->expectExceptionMessage('Shipping address is not allowed on cart: cart contains no items for shipment.');

$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function testSetNewShippingAddressOnCartWithSimpleProduct()
public function testSetNewShippingAddressOnCartWithVirtualProduct()
{
$this->expectException(\Exception::class);
$this->expectExceptionMessage('The Cart includes virtual product(s) only, so a shipping address is not used.');
$this->expectExceptionMessage('Shipping address is not allowed on cart: cart contains no items for shipment.');

$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');

Expand Down

0 comments on commit 1091a30

Please sign in to comment.