public function testHandleForbiddenProps() { DAV_Test_Request_PROPPATCH::setInputstring(<<<EOS <?xml version="1.0" encoding="utf-8" ?> <D:propertyupdate xmlns:D="DAV:" xmlns:ns1="http://ns.example.com/tests/"> <D:set> <D:prop> <ns1:prop1>Some value for prop1</ns1:prop1> <D:creationdate>some date</D:creationdate> <forbidden_to_write xmlns="test:">some date</forbidden_to_write> </D:prop> </D:set> </D:propertyupdate> EOS ); $this->expectOutputString(<<<EOS DAVACL_Test_Resource::method_PROPPATCH() called for /path and parameters http://ns.example.com/tests/ prop1 - 'Some value for prop1' Content-Type: application/xml; charset="utf-8" HTTP/1.1 207 Multi-Status <?xml version="1.0" encoding="utf-8"?> <D:multistatus xmlns:D="DAV:"> <D:response><D:href>/path</D:href> <D:propstat><D:prop> <D:creationdate/> <ns:forbidden_to_write xmlns:ns="test:"/> </D:prop> <D:status>HTTP/1.1 403 Forbidden</D:status> </D:propstat> <D:propstat><D:prop> <ns:prop1 xmlns:ns="http://ns.example.com/tests/"/> </D:prop> <D:status>HTTP/1.1 424 Failed Dependency</D:status> </D:propstat> </D:response> </D:multistatus> EOS ); $obj = DAV_Test_Request_PROPPATCH::inst(); $obj->handleRequest(); }
public static function setInputstring($inputstring) { self::$inputstring = $inputstring; }