XML; $request = new Request('REPORT', '/principals', ['Content-Type' => 'application/xml']); $request->setBody($xml); $response = $this->request($request, 207); $expected = << HTTP/1.1 200 OK /principals/user1 HTTP/1.1 418 I'm a teapot XML; $this->assertXmlStringEqualsXmlString( $expected, $response->getBodyAsString() ); } function testPrincipalMatchProp() { $xml = << XML; $request = new Request('REPORT', '/principals', ['Content-Type' => 'application/xml']); $request->setBody($xml); $response = $this->request($request, 207); $expected = << HTTP/1.1 200 OK /principals/user1/ HTTP/1.1 200 OK XML; $this->assertXmlStringEqualsXmlString( $expected, $response->getBodyAsString() ); } function testPrincipalMatchPrincipalProperty() { $xml = << XML; $request = new Request('REPORT', '/principals', ['Content-Type' => 'application/xml']); $request->setBody($xml); $response = $this->request($request, 207); $expected = << HTTP/1.1 200 OK /principals/user1/ HTTP/1.1 200 OK XML; $this->assertXmlStringEqualsXmlString( $expected, $response->getBodyAsString() ); } }