/** * @test */ public function getReplies() { $user1 = $this->getUser("test1"); $user3 = $this->getUser("test3"); $helper = new Helpers_Paginator_Status(); $paginator = $helper->getReplies($user1->id, array(), 5); $this->eq(9, $paginator->count); // ------------------------------------------------------ $paginator = $helper->getReplies($user1->id, array("page" => 2), 5); $items = $paginator->results; $this->eq(4, count($items)); $this->eq("2008-01-04 18:00:00", $items[0]->created_at); $this->eq($user3->id, $items[0]->user_id); $this->eq($user1->id, $items[0]->reply_user_id); $this->eq("2008-01-03 18:00:00", $items[1]->created_at); $this->eq("2008-01-02 18:00:00", $items[2]->created_at); $this->eq("2008-01-01 18:00:00", $items[3]->created_at); }
public function replies() { $helper = new Helpers_Paginator_Status(); $this->paginator = $helper->getReplies($this->aclUser->id, $this->GET_VARS); $this->view->setName("common"); }