File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
app/code/Magento/Quote/Model
api-functional/testsuite/Magento/GraphQl/Quote/Guest
integration/testsuite/Magento/Checkout/Model Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 24
24
use Magento \Store \Model \StoreManagerInterface ;
25
25
26
26
/**
27
- * Class QuoteManagement
27
+ * Class for managing quote
28
28
*
29
29
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
30
30
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ class CreateEmptyCartTest extends GraphQlAbstract
39
39
*/
40
40
private $ quoteIdMaskFactory ;
41
41
42
+ /**
43
+ * @var string
44
+ */
45
+ private $ maskedQuoteId ;
46
+
42
47
protected function setUp (): void
43
48
{
44
49
$ objectManager = Bootstrap::getObjectManager ();
@@ -61,7 +66,7 @@ public function testCreateEmptyCart()
61
66
self ::assertNotNull ($ guestCart ->getId ());
62
67
self ::assertNull ($ guestCart ->getCustomer ()->getId ());
63
68
self ::assertEquals ('default ' , $ guestCart ->getStore ()->getCode ());
64
- self ::assertTrue ( $ guestCart ->getCustomerIsGuest ());
69
+ self ::assertEquals ( ' 1 ' , $ guestCart ->getCustomerIsGuest ());
65
70
}
66
71
67
72
/**
@@ -82,7 +87,7 @@ public function testCreateEmptyCartWithNotDefaultStore()
82
87
self ::assertNotNull ($ guestCart ->getId ());
83
88
self ::assertNull ($ guestCart ->getCustomer ()->getId ());
84
89
self ::assertSame ('fixture_second_store ' , $ guestCart ->getStore ()->getCode ());
85
- self ::assertTrue ( $ guestCart ->getCustomerIsGuest ());
90
+ self ::assertEquals ( ' 1 ' , $ guestCart ->getCustomerIsGuest ());
86
91
}
87
92
88
93
/**
Original file line number Diff line number Diff line change @@ -199,7 +199,8 @@ public function testLoadCustomerQuoteCustomerWithoutQuote(): void
199
199
$ this ->quote ->getCustomerEmail (),
200
200
'Precondition failed: Customer data must not be set to quote '
201
201
);
202
- $ this ->assertTrue (
202
+ self ::assertEquals (
203
+ '0 ' ,
203
204
$ this ->quote ->getCustomerIsGuest (),
204
205
'Precondition failed: Customer must be as guest in quote '
205
206
);
@@ -256,7 +257,7 @@ public function testGetQuoteWithProductWithTierPrice(): void
256
257
public function testGetQuoteNotInitializedGuest ()
257
258
{
258
259
$ quote = $ this ->checkoutSession ->getQuote ();
259
- $ this -> assertTrue ( $ quote ->getCustomerIsGuest ());
260
+ self :: assertEquals ( ' 1 ' , $ quote ->getCustomerIsGuest ());
260
261
}
261
262
262
263
/**
@@ -303,7 +304,8 @@ private function validateCustomerDataInQuote(CartInterface $quote): void
303
304
$ quote ->getCustomerFirstname (),
304
305
'Customer first name was not set to Quote correctly. '
305
306
);
306
- $ this ->assertFalse (
307
+ self ::assertEquals (
308
+ '0 ' ,
307
309
$ quote ->getCustomerIsGuest (),
308
310
'Customer should not be as guest in Quote. '
309
311
);
You can’t perform that action at this time.
0 commit comments