diff --git a/modules/cart/tests/src/Unit/CartProviderTest.php b/modules/cart/tests/src/Unit/CartProviderTest.php index eff3f47..be8e489 100644 --- a/modules/cart/tests/src/Unit/CartProviderTest.php +++ b/modules/cart/tests/src/Unit/CartProviderTest.php @@ -168,6 +168,9 @@ class CartProviderTest extends UnitTestCase { ->method('condition') ->willReturnSelf(); $queryWithOrders->expects($this->any()) + ->method('sort') + ->willReturnSelf(); + $queryWithOrders->expects($this->any()) ->method('execute') ->willReturn(array_keys($orders)); @@ -302,12 +305,11 @@ class CartProviderTest extends UnitTestCase { // Test the createCart method. $cart = $cartProvider->createCart($this->firstOrderType, $this->store, $this->registeredUser); - $this->assertInstanceOf(OrderInterface::class, $cart, 'The cart is created for an anonymous user if createCart returns an Order entity.'); + $this->assertInstanceOf(OrderInterface::class, $cart, 'The cart is created for a registered user if createCart returns an Order entity.'); // Test recreating the cart again with the createCart method. $cart = $cartProvider->createCart($this->firstOrderType, $this->store, $this->registeredUser); - $this->assertFalse($cart, 'The cart is created for an anonymous user if createCart returns an Order entity.'); - + $this->assertFalse($cart, 'The cart is created for a registered user if createCart returns an Order entity.'); } /**