/** * Test empty cart */ public function testCartPreviewWhenCartIsEmpty() { // Start with an empty cart $cart = new Cart(); $cart->module_srl = 123; $cart->save(); $this->assertEquals(0, count($cart->getProducts())); // Check that Cart preview product count is also 0 $cart_preview = new CartPreview($cart); $this->assertEquals(0, $cart_preview->getCartProductsCount()); }