Dumplie\Customer\Tests\Integration\Application\Generic\CheckoutTestCase::test_change_shipping_address PHP Method

test_change_shipping_address() public method

    function test_change_shipping_address()
    {
        $cartId = $this->customerContext->createEmptyCart();
        $command = new NewCheckout((string) $cartId, "Norbert Orzechowicz", "ul. FLorianska 1", "30-300", "Kraków", "PL");
        $this->customerContext->commandBus()->handle($command);
        $shippingAddressCommand = new ChangeShippingAddress((string) $cartId, "Lesze Prabucki", "ul. Rynek 2", "40-400", "Gdańsk", "PL");
        $this->customerContext->commandBus()->handle($shippingAddressCommand);
        $this->clear();
        $this->assertEquals("Norbert Orzechowicz, 30-300 Kraków, ul. FLorianska 1, PL", (string) $this->customerContext->checkouts()->getForCart($cartId)->billingAddress());
        $this->assertEquals("Lesze Prabucki, 40-400 Gdańsk, ul. Rynek 2, PL", (string) $this->customerContext->checkouts()->getForCart($cartId)->shippingAddress());
    }