6 declare(strict_types=1);
27 public function testAfterRemoveItem():
void 31 $quote->load(
'test_order_with_virtual_product',
'reserved_order_id');
34 $quoteBillingAddress->setRegion(
'CA')
35 ->setPostcode(
'90210')
36 ->setFirstname(
'a_unique_firstname')
37 ->setLastname(
'lastname')
39 ->setCity(
'Beverly Hills')
41 ->setTelephone(
'1111111111')
43 ->setAddressType(
'billing');
47 $billingAddressManagement->assign(
$quote->getId(), $quoteBillingAddress);
50 $checkoutSession->setQuoteId(
$quote->getId());
54 $activeQuote =
$cart->getQuote();
56 $activeQuote->getExtensionAttributes()->setShippingAssignments([
'test']);
58 $cart->removeItem($activeQuote->getAllVisibleItems()[0]->getId());
62 $this->assertEmpty($activeQuote->getExtensionAttributes()->getShippingAssignments());
66 $quote->load(
'test_order_with_virtual_product',
'reserved_order_id');
67 $quoteBillingAddressUpdated =
$quote->getBillingAddress();
70 $this->assertEquals($quoteBillingAddressUpdated->getEmail(),
$customer->getEmail());
71 $this->assertEmpty($quoteBillingAddressUpdated->getCountryId());
72 $this->assertEmpty($quoteBillingAddressUpdated->getRegionId());
73 $this->assertEmpty($quoteBillingAddressUpdated->getRegion());
74 $this->assertEmpty($quoteBillingAddressUpdated->getPostcode());
75 $this->assertEmpty($quoteBillingAddressUpdated->getCity());
static getObjectManager()