Horde_Kolab_Storage_Object::hasParseErrors PHP Méthode

hasParseErrors() public méthode

public hasParseErrors ( )
    public function hasParseErrors()
    {
        return !empty($this->_errors);
    }

Usage Example

Exemple #1
0
 public function testMissingKolabPart()
 {
     $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'));
     $this->assertEquals(Horde_Kolab_Storage_Object::TYPE_INVALID, $object->getType());
     $this->assertContains(Horde_Kolab_Storage_Object::ERROR_MISSING_KOLAB_PART, array_keys($object->getParseErrors()));
     $this->assertTrue($object->hasParseErrors());
 }