Example #1
0
    public function testAddCart()
    {
        $cart = new Cart(array(
            'module_srl'    => 307,
            'member_srl'    => NULL,
            'guest_srl'     => 14,
            'session_id'    => NULL,
            'items'         => NULL,
            'regdate'       => '20100424171420',
            'last_update'   => '20100424192420'
        ));

        $cart_repository = new CartRepository();
        $cart_repository->insertCart($cart);
        $this->assertEquals(3, $this->getConnection()->getRowCount('xe_shop_cart'), "Insert failed");
    }
Example #2
0
 public function save()
 {
     return $this->cart_srl ? $this->repo->updateCart($this) : $this->repo->insertCart($this);
 }