public function testGetActionContainsCorrectEntryPublished() { $this->_entryMapper->postEntry($this->_testEntry); $this->dispatch('/entry/get/id/' . $this->_testEntry->getId()); $this->assertQuery('.hentry abbr.published[title="' . $this->_testEntry->getPublished()->get(Zend_Date::ISO_8601) . '"]'); $this->assertQueryContentContains('.hentry abbr.published', $this->_testEntry->getPublished()->get(Zend_Date::DATETIME_SHORT)); }
/** * Populate Row FromEntry * * @param Postr_Model_Entry $entry * @param Zend_Db_Table_Row_Abstract $entryRow * @return Zend_Db_Table_Row_Abstract */ protected function _populateRowFromEntry(Postr_Model_Entry $entry, Zend_Db_Table_Row_Abstract $entryRow = null) { if (null === $entryRow) { $entryRow = $this->_entryTable->createRow(); } $entryRow->id = $entry->getId(); $entryRow->title = $entry->getTitle(); $entryRow->content = $entry->getContent(); $entryRow->summary = $entry->getSummary(); $entryRow->updated = $entry->getUpdated()->get(Zend_Date::ISO_8601); $entryRow->published = $entry->getPublished()->get(Zend_Date::ISO_8601); return $entryRow; }
public function isEqualTo(Postr_Model_Entry $entry) { return $this->getTitle() == $entry->getTitle() && $this->getContent() == $entry->getContent() && $this->getSummary() == $entry->getSummary() && $this->getUpdated()->get(Zend_Date::DATETIME_SHORT) == $entry->getUpdated()->get(Zend_Date::DATETIME_SHORT) && $this->getPublished()->get(Zend_Date::DATETIME_SHORT) == $entry->getPublished()->get(Zend_Date::DATETIME_SHORT); }
public function testSetAndGetPublished() { $value = new Zend_Date(); $this->_entry->setPublished($value); $this->assertEquals($value, $this->_entry->getPublished()); }