mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 17:08:48 +00:00
Set notifications of events; the actual notification routine is not yet implemented
This commit is contained in:
parent
62ec9bfa69
commit
8196f9b900
26 changed files with 324 additions and 212 deletions
|
@ -58,9 +58,9 @@ class Sabre_DAV_ServerPropsTest extends Sabre_DAV_AbstractServer {
|
|||
$this->response->headers
|
||||
);
|
||||
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"DAV:\"",$this->response->body);
|
||||
$xml = simplexml_load_string($body);
|
||||
$xml->registerXPathNamespace('d','urn:DAV');
|
||||
$xml->registerXPathNamespace('d','DAV:');
|
||||
|
||||
list($data) = $xml->xpath('/d:multistatus/d:response/d:href');
|
||||
$this->assertEquals('/',(string)$data,'href element should have been /');
|
||||
|
@ -81,9 +81,9 @@ class Sabre_DAV_ServerPropsTest extends Sabre_DAV_AbstractServer {
|
|||
|
||||
$this->sendRequest($xml);
|
||||
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"DAV:\"",$this->response->body);
|
||||
$xml = simplexml_load_string($body);
|
||||
$xml->registerXPathNamespace('d','urn:DAV');
|
||||
$xml->registerXPathNamespace('d','DAV:');
|
||||
|
||||
$data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:supportedlock/d:lockentry');
|
||||
$this->assertEquals(2,count($data),'We expected two \'d:lockentry\' tags');
|
||||
|
@ -115,9 +115,9 @@ class Sabre_DAV_ServerPropsTest extends Sabre_DAV_AbstractServer {
|
|||
|
||||
$this->sendRequest($xml);
|
||||
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"DAV:\"",$this->response->body);
|
||||
$xml = simplexml_load_string($body);
|
||||
$xml->registerXPathNamespace('d','urn:DAV');
|
||||
$xml->registerXPathNamespace('d','DAV:');
|
||||
|
||||
$data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop/d:lockdiscovery');
|
||||
$this->assertEquals(1,count($data),'We expected a \'d:lockdiscovery\' tag');
|
||||
|
@ -134,9 +134,9 @@ class Sabre_DAV_ServerPropsTest extends Sabre_DAV_AbstractServer {
|
|||
</d:propfind>';
|
||||
|
||||
$this->sendRequest($xml);
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"DAV:\"",$this->response->body);
|
||||
$xml = simplexml_load_string($body);
|
||||
$xml->registerXPathNamespace('d','urn:DAV');
|
||||
$xml->registerXPathNamespace('d','DAV:');
|
||||
$pathTests = array(
|
||||
'/d:multistatus',
|
||||
'/d:multistatus/d:response',
|
||||
|
@ -312,9 +312,9 @@ class Sabre_DAV_ServerPropsTest extends Sabre_DAV_AbstractServer {
|
|||
|
||||
$this->assertEquals('HTTP/1.1 207 Multi-Status',$this->response->status,'We got the wrong status. Full XML response: ' . $this->response->body);
|
||||
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"DAV:\"",$this->response->body);
|
||||
$xml = simplexml_load_string($body);
|
||||
$xml->registerXPathNamespace('d','urn:DAV');
|
||||
$xml->registerXPathNamespace('d','DAV:');
|
||||
$xml->registerXPathNamespace('bla','http://www.rooftopsolutions.nl/testnamespace');
|
||||
|
||||
$data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop');
|
||||
|
@ -345,9 +345,9 @@ class Sabre_DAV_ServerPropsTest extends Sabre_DAV_AbstractServer {
|
|||
|
||||
$this->sendRequest($xml);
|
||||
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
|
||||
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"DAV:\"",$this->response->body);
|
||||
$xml = simplexml_load_string($body);
|
||||
$xml->registerXPathNamespace('d','urn:DAV');
|
||||
$xml->registerXPathNamespace('d','DAV:');
|
||||
$xml->registerXPathNamespace('bla','http://www.rooftopsolutions.nl/testnamespace');
|
||||
|
||||
$xpath='//bla:someprop';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue