Beispiel #1
0
 public function testCreateDefaults()
 {
     $cart = new Cart();
     $this->assertTrue($cart->getId() instanceof UuidInterface);
     $this->assertTrue($cart->getCreated() instanceof DateTime);
     $this->assertSame(null, $cart->getSessionId());
     $this->assertSame(null, $cart->getUser());
     $this->assertSame(null, $cart->getShippingAddress());
     $this->assertSame(null, $cart->getShipmentRate());
     $this->assertSame(null, $cart->getTaxRate());
     $this->assertSame('0.0.0.0', $cart->getIp4());
     $this->assertSame(0, count($cart->getCartItems()));
     $this->assertSame(0, count($cart->getCoupons()));
 }