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

test_change_billing_address() public method

    function test_change_billing_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);
        $changeBillingAddress = new ChangeBillingAddress((string) $cartId, "Lesze Prabucki", "ul. Rynek 2", "40-400", "Gdańsk", "PL");
        $this->customerContext->commandBus()->handle($changeBillingAddress);
        $this->clear();
        $this->assertEquals("Lesze Prabucki, 40-400 Gdańsk, ul. Rynek 2, PL", (string) $this->customerContext->checkouts()->getForCart($cartId)->billingAddress());
    }