Dumplie\Customer\Tests\Integration\Application\Generic\CartTestCase::test_removing_products_from_cart PHP Method

test_removing_products_from_cart() public method

    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());
    }