Dumplie\Customer\Tests\CustomerContext::carts PHP Метод

carts() публичный Метод

public carts ( ) : Dumplie\Customer\Domain\Carts
Результат Dumplie\Customer\Domain\Carts
    public function carts() : Carts;

Usage Example

Пример #1
0
 function test_removing_products_from_cart()
 {
     $cartId = $this->customerContext->createEmptyCart('EUR');
     $addCommand = new AddToCart('SKU_1', 2, (string) $cartId);
     $this->customerContext->commandBus()->handle($addCommand);
     $removeCommand = new RemoveFromCart((string) $cartId, 'SKU_1');
     $this->customerContext->commandBus()->handle($removeCommand);
     $this->clear();
     $cart = $this->customerContext->carts()->getById($cartId);
     $this->assertTrue($cart->isEmpty());
 }
All Usage Examples Of Dumplie\Customer\Tests\CustomerContext::carts