Skip to content

Commit 222b763

Browse files
committed
MC-37321: Quote customer_is_guest = false
1 parent 03db1d6 commit 222b763

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

app/code/Magento/Quote/Model/QuoteManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
use Magento\Store\Model\StoreManagerInterface;
2525

2626
/**
27-
* Class QuoteManagement
27+
* Class for managing quote
2828
*
2929
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
3030
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CreateEmptyCartTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ class CreateEmptyCartTest extends GraphQlAbstract
3939
*/
4040
private $quoteIdMaskFactory;
4141

42+
/**
43+
* @var string
44+
*/
45+
private $maskedQuoteId;
46+
4247
protected function setUp(): void
4348
{
4449
$objectManager = Bootstrap::getObjectManager();
@@ -61,7 +66,7 @@ public function testCreateEmptyCart()
6166
self::assertNotNull($guestCart->getId());
6267
self::assertNull($guestCart->getCustomer()->getId());
6368
self::assertEquals('default', $guestCart->getStore()->getCode());
64-
self::assertTrue($guestCart->getCustomerIsGuest());
69+
self::assertEquals('1', $guestCart->getCustomerIsGuest());
6570
}
6671

6772
/**
@@ -82,7 +87,7 @@ public function testCreateEmptyCartWithNotDefaultStore()
8287
self::assertNotNull($guestCart->getId());
8388
self::assertNull($guestCart->getCustomer()->getId());
8489
self::assertSame('fixture_second_store', $guestCart->getStore()->getCode());
85-
self::assertTrue($guestCart->getCustomerIsGuest());
90+
self::assertEquals('1', $guestCart->getCustomerIsGuest());
8691
}
8792

8893
/**

dev/tests/integration/testsuite/Magento/Checkout/Model/SessionTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ public function testLoadCustomerQuoteCustomerWithoutQuote(): void
199199
$this->quote->getCustomerEmail(),
200200
'Precondition failed: Customer data must not be set to quote'
201201
);
202-
$this->assertTrue(
202+
self::assertEquals(
203+
'0',
203204
$this->quote->getCustomerIsGuest(),
204205
'Precondition failed: Customer must be as guest in quote'
205206
);
@@ -256,7 +257,7 @@ public function testGetQuoteWithProductWithTierPrice(): void
256257
public function testGetQuoteNotInitializedGuest()
257258
{
258259
$quote = $this->checkoutSession->getQuote();
259-
$this->assertTrue($quote->getCustomerIsGuest());
260+
self::assertEquals('1', $quote->getCustomerIsGuest());
260261
}
261262

262263
/**
@@ -303,7 +304,8 @@ private function validateCustomerDataInQuote(CartInterface $quote): void
303304
$quote->getCustomerFirstname(),
304305
'Customer first name was not set to Quote correctly.'
305306
);
306-
$this->assertFalse(
307+
self::assertEquals(
308+
'0',
307309
$quote->getCustomerIsGuest(),
308310
'Customer should not be as guest in Quote.'
309311
);

0 commit comments

Comments
 (0)