public function testAllEvent() { $this->modelEvent = new CommentsEventModel(); $state = $this->modelEvent->insertCommentEvent(1, 1, 'Trop SWAG'); $this->assertEquals(true, $state); $array = $this->modelEvent->getCommentsForEvent(1); $this->assertNotEmpty($array); $state = $this->modelEvent->deleteCommentEvent(0); $this->assertEquals(true, $state); }
public function delete() { $id = (int) $this->getParams()[0]; $this->modelComment = $this->loadModel('CommentsEvent'); $this->modelComment->deleteCommentEvent($id); }