public function testAllArticle()
 {
     $this->modelArticle = new CommentsArticleModel();
     $state = $this->modelArticle->insertCommentArticle(1, 87, 'Trop SWAG');
     $this->assertEquals(true, $state);
     $state = $this->modelArticle->getCommentsForArticle(87);
     $this->assertNotEmpty($state);
     $state = $this->modelArticle->deleteCommentArticle(0);
     $this->assertEquals(true, $state);
 }
 public function commentPOST()
 {
     if (!Authentication::getInstance()->isAuthenticated()) {
         throw new NotAuthenticatedException();
     }
     $id = (int) $this->getParams()[0];
     $this->articleCommentModel->insertCommentArticle(Authentication::getInstance()->getUserId(), $id, Input::post('message'));
     $this->getView()->redirect('/article/show/' . $id);
 }