public function testSetLinkThrowsExceptionOnInvalidUri() { $entry = new Zend_Feed_Writer_Entry(); try { $entry->setLink('http://'); $this->fail(); } catch (Zend_Feed_Exception $e) { } }
/** * Populate feed entry data * * @param Cms_Model_Page $page * @param Zend_Feed_Entry_Abstract $entry */ protected function _populateFeedEntry(Cms_Model_Page $page, Zend_Feed_Writer_Entry $entry) { $entry->setTitle($page->get_title()); $entry->setLink($this->view->serverUrl() . $this->view->url(array('module' => $this->getRequest()->getModuleName(), 'controller' => $this->getRequest()->getControllerName(), 'action' => 'index', 'url_id' => $page->get_url_id()), 'cms')); if (null != $page->get_user_name() && '' != $page->get_user_name()) { $entry->addAuthor(array('name' => $page->get_user_name())); } $entry->setDateModified(new Zend_Date($page->get_posted(), Zend_Date::ISO_8601)); if (null != $page->get_teaser() && '' != $page->get_teaser()) { $entry->setDescription($page->get_teaser()); } $entry->setContent($this->_fixRelImagePaths($page->get_content())); }