mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-10-14 02:43:01 +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
|
@ -60,7 +60,7 @@ class Sabre_DAV_Property_HrefListTest extends PHPUnit_Framework_TestCase {
|
|||
function testUnserialize() {
|
||||
|
||||
$xml = '<?xml version="1.0"?>
|
||||
<d:anything xmlns:d="urn:DAV"><d:href>/bla/foo</d:href><d:href>/bla/bar</d:href></d:anything>
|
||||
<d:anything xmlns:d="DAV:"><d:href>/bla/foo</d:href><d:href>/bla/bar</d:href></d:anything>
|
||||
';
|
||||
|
||||
$dom = new DOMDocument();
|
||||
|
@ -74,7 +74,7 @@ class Sabre_DAV_Property_HrefListTest extends PHPUnit_Framework_TestCase {
|
|||
function testUnserializeIncompatible() {
|
||||
|
||||
$xml = '<?xml version="1.0"?>
|
||||
<d:anything xmlns:d="urn:DAV"><d:href2>/bla/foo</d:href2></d:anything>
|
||||
<d:anything xmlns:d="DAV:"><d:href2>/bla/foo</d:href2></d:anything>
|
||||
';
|
||||
|
||||
$dom = new DOMDocument();
|
||||
|
|
|
@ -60,7 +60,7 @@ class Sabre_DAV_Property_HrefTest extends PHPUnit_Framework_TestCase {
|
|||
function testUnserialize() {
|
||||
|
||||
$xml = '<?xml version="1.0"?>
|
||||
<d:anything xmlns:d="urn:DAV"><d:href>/bla/path</d:href></d:anything>
|
||||
<d:anything xmlns:d="DAV:"><d:href>/bla/path</d:href></d:anything>
|
||||
';
|
||||
|
||||
$dom = new DOMDocument();
|
||||
|
@ -74,7 +74,7 @@ class Sabre_DAV_Property_HrefTest extends PHPUnit_Framework_TestCase {
|
|||
function testUnserializeIncompatible() {
|
||||
|
||||
$xml = '<?xml version="1.0"?>
|
||||
<d:anything xmlns:d="urn:DAV"><d:href2>/bla/path</d:href2></d:anything>
|
||||
<d:anything xmlns:d="DAV:"><d:href2>/bla/path</d:href2></d:anything>
|
||||
';
|
||||
|
||||
$dom = new DOMDocument();
|
||||
|
|
|
@ -37,9 +37,9 @@ class Sabre_DAV_Property_SupportedReportSetTest extends Sabre_DAV_AbstractServer
|
|||
|
||||
$this->assertEquals('HTTP/1.1 207 Multi-Status',$this->response->status,'We expected a multi-status response. Full response body: ' . $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:');
|
||||
|
||||
$data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop');
|
||||
$this->assertEquals(1,count($data),'We expected 1 \'d:prop\' element');
|
||||
|
@ -74,9 +74,9 @@ class Sabre_DAV_Property_SupportedReportSetTest extends Sabre_DAV_AbstractServer
|
|||
|
||||
$this->assertEquals('HTTP/1.1 207 Multi-Status',$this->response->status,'We expected a multi-status response. Full response body: ' . $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('x','http://www.rooftopsolutions.nl/testnamespace');
|
||||
|
||||
$data = $xml->xpath('/d:multistatus/d:response/d:propstat/d:prop');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue