Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 public function testSetAndGetId()
 {
     $value = 371;
     $this->_entry->setId($value);
     $this->assertEquals($value, $this->_entry->getId());
 }
Ejemplo n.º 3
0
 /**
  * @expectedException Exception
  */
 public function testPuttingNonExistentEntryThrowsException()
 {
     $this->_testEntry->setId(42);
     $this->_entryMapper->putEntry($this->_testEntry);
 }