public function getContent() { if ($this->_content === null) { $this->_content = $this->_getDriver()->fetchBodypart($this->_getFolder(), $this->getBackendId(), $this->_getMimePartId()); } return $this->_content; }
/** * @expectedException Horde_Kolab_Storage_Object_Exception */ public function testFetchingContentsFailsWithMissingMimeId() { $data = $this->getMock('Horde_Kolab_Storage_Object_Writer'); $headers = $this->getMock('Horde_Mime_Headers'); $object = new Horde_Kolab_Storage_Object(); $this->folder->expects($this->once())->method('getType')->will($this->returnValue('event')); $this->folder->expects($this->once())->method('getPath')->will($this->returnValue('INBOX/Calendar')); $object->setDriver($this->driver); $this->driver->expects($this->once())->method('fetchHeaders')->with('INBOX/Calendar', '1')->will($this->returnValue($headers)); $object->load('1', $this->folder, $data, new Horde_Mime_Part()); $object->getContent(); }