/** * @depends testSetProperty * @param DAV_Element_response $obj The response object from previous tests * @return void */ public function testSetStatus($obj) { $obj->setStatus('test://test/ empty_prop', new DAV_Status(DAV::HTTP_CONFLICT)); $obj->setStatus('test://test/ prop_with_value', new DAV_Status(DAV::HTTP_METHOD_NOT_ALLOWED)); $this->assertSame('<D:response><D:href>/path</D:href><D:propstat><D:prop><ns:empty_prop xmlns:ns="test://test/"/></D:prop><D:status>HTTP/1.1 409 Conflict</D:status></D:propstat><D:propstat><D:prop><ns:prop_with_value xmlns:ns="test://test/"><![CDATA[Some piece of data]]></ns:prop_with_value></D:prop><D:status>HTTP/1.1 405 Method Not Allowed</D:status></D:propstat></D:response>', str_replace("\n", '', $obj->toXML()), 'DAV_Element_response: the path set by the constructor should be used in toXML()'); }