Exemple #1
0
 public function testEntryIsEqualToEntryWithSamePropertiesAndDifferentId()
 {
     $now = new Zend_Date();
     $this->_entry->setTitle('Test Entry')->setContent('Test Content')->setSummary('Test Summary')->setUpdated($now)->setPublished($now);
     $entryWithDifferentId = clone $this->_entry;
     $this->assertTrue($this->_entry->isEqualTo($entryWithDifferentId));
 }
 public function testPutActionEntryIsCorrect()
 {
     $this->_entryMapper->postEntry($this->_testEntry);
     $this->getRequest()->setParams($this->_getTestEntryParams());
     $this->dispatch('/entry/put/id/' . $this->_testEntry->getId());
     $id = $this->getRequest()->getParam('id');
     $putEntry = $this->_entryMapper->getEntry($id);
     $this->assertTrue($this->_testEntry->isEqualTo($putEntry));
 }
 public function testGetEntryIsEqualToPostedEntry()
 {
     $this->_entryMapper->postEntry($this->_testEntry);
     $this->assertTrue($this->_testEntry->isEqualTo($this->_entryMapper->getEntry($this->_testEntry->getId())));
 }