/** * Create Entry From Row * * @param Zend_Db_Table_Row_Abstract $entryRow * @return Postr_Model_Entry */ public function createEntryFromRow(Zend_Db_Table_Row_Abstract $entryRow) { $updated = new Zend_Date($entryRow->updated, Zend_Date::ISO_8601); $published = new Zend_Date($entryRow->published, Zend_Date::ISO_8601); $entry = new Postr_Model_Entry(); $entry->setId($entryRow->id)->setTitle($entryRow->title)->setContent($entryRow->content)->setSummary($entryRow->summary)->setUpdated($updated)->setPublished($published); return $entry; }
public function testSetAndGetId() { $value = 371; $this->_entry->setId($value); $this->assertEquals($value, $this->_entry->getId()); }
/** * @expectedException Exception */ public function testPuttingNonExistentEntryThrowsException() { $this->_testEntry->setId(42); $this->_entryMapper->putEntry($this->_testEntry); }