Ejemplo n.º 1
0
 /**
  * delete list by list id
  *
  * @param type $wish_list_id
  */
 public function deleteWL($wish_list_id)
 {
     $wishlist = new \wishlist\classes\ParentWishlist();
     $wishlist->deleteWL($wish_list_id);
     if (!strstr($this->uri->uri_string(), 'editWL')) {
         $user_id = $this->session->userdata('admin_edit_user_id');
         redirect('/admin/components/cp/wishlist/userWL/' . $user_id . '#lists');
     } else {
         redirect($_SERVER['HTTP_REFERER'] . "#lists");
     }
 }
Ejemplo n.º 2
0
 /**
  * @covers Wishlist_model::getUserWishList
  */
 public function testGetUserWishList()
 {
     $wishlist = new \wishlist\classes\ParentWishlist();
     $wishlist->createWishList($GLOBALS['userId'], 'test');
     $id = $this->object->db->insert_id();
     $this->assertInternalType('array', $this->object->getUserWishList($GLOBALS['userId'], $id, array('public', 'shared', 'private')));
     //        $wishlist->deleteWL($id);
     return $id;
 }