public function testSerializeUnserializeRetainsErrors() { $data = $this->getMock('Horde_Kolab_Storage_Object_Writer'); $object = new Horde_Kolab_Storage_Object(); $headers = $this->getMock('Horde_Mime_Headers'); $headers->expects($this->once())->method('getValue')->with('X-Kolab-Type')->will($this->returnValue('application/x-vnd.kolab.note')); $this->folder->expects($this->once())->method('getType')->will($this->returnValue('event')); $this->folder->expects($this->once())->method('getPath')->will($this->returnValue('INBOX/Calendar')); $this->driver->expects($this->once())->method('fetchHeaders')->with('INBOX/Calendar', '1')->will($this->returnValue($headers)); $object->setDriver($this->driver); $object->load('1', $this->folder, $data, $this->getMultipartMimeMessage('application/x-vnd.kolab.task')); $new_object = new Horde_Kolab_Storage_Object(); $new_object->unserialize($object->serialize()); $this->assertContains(Horde_Kolab_Storage_Object::ERROR_MISSING_KOLAB_PART, array_keys($new_object->getParseErrors())); }