public function testNotSpam() { $this->login('uberadmin'); $this->request('admin/blog/comment/notspam', array('commentID' => '666', 'from' => 'blog/admin/comment/index/3')); $comment = BlogComment::get(666); $this->assertEquals(PropertySpamStatus::OK, $comment->spamStatus); $this->assertFlashNotice('Comment unmarked as spam'); $this->assertRedirected('blog/admin/comment/index/3'); }
protected function findComment($ID) { $this->_comment = BlogComment::get($ID); return $this->_comment; }
protected function findComment($ID) { $this->_comment = BlogComment::get($ID); if ($this->_comment) { $year = date('Y', $this->_comment->blogDatePosted); $month = date('m', $this->_comment->blogDatePosted); $day = date('d', $this->_comment->blogDatePosted); $this->_blog = Blog::getBlog($year, $month, $day, $this->_comment->blogID, $this->_comment->blogLanguage); return true; } else { return false; } }