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

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

public createEmptyCart ( string $currency = 'EUR' ) : CartId
$currency string
Результат Dumplie\Customer\Domain\CartId
    public function createEmptyCart(string $currency = 'EUR') : CartId;

Usage Example

Пример #1
0
 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());
 }
All Usage Examples Of Dumplie\Customer\Tests\CustomerContext::createEmptyCart