Skip to content

Commit 3418011

Browse files
committed
Fixed custom property test. I think this failed due to a new xml namespaces prefix collision. RegisterXPathNamespace is not as great as hoped
1 parent cedf6d6 commit 3418011

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/Sabre/DAV/ServerPropsTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,12 @@ public function testPropPatchAndFetch() {
189189
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
190190
$xml = simplexml_load_string($body);
191191
$xml->registerXPathNamespace('d','urn:DAV');
192-
$xml->registerXPathNamespace('s','http://www.rooftopsolutions.nl/testnamespace');
192+
$xml->registerXPathNamespace('bla','http://www.rooftopsolutions.nl/testnamespace');
193193

194-
$xpath='//d:prop/s:someprop';
194+
$xpath='//bla:someprop';
195195
$result = $xml->xpath($xpath);
196-
$this->assertEquals('somevalue',(string)$result[0]);
196+
$this->assertEquals(1,count($result),'We couldn\'t find our new property in the response. Full response body:' . "\n" . $body);
197+
$this->assertEquals('somevalue',(string)$result[0],'We couldn\'t find our new property in the response. Full response body:' . "\n" . $body);
197198

198199

199200
}

0 commit comments

Comments
 (0)