/** * Renders a blog article. * * @param int $id An article ID. * * @return string (X)HTML. * * @global array The headings of the pages. * @global int The current page index. * @global string The page title. * @global string The value of the page's meta description. */ protected function renderArticle($id) { global $h, $s, $title, $description; $article = Realblog_Article::findById($id); if (isset($article)) { $title .= $h[$s] . " – " . $article->getTitle(); $description = $this->getDescription($article); $view = new Realblog_ArticleView($id, $article, $this->getPage()); return $view->render(); } }
/** * Asserts that a matcher is rendered. * * @param array $matcher A matcher. * * @return void */ private function _assertRenders($matcher) { @$this->assertTag($matcher, $this->_subject->render()); }