"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/Sabre/CalDAV/JCalTransformTest.php" between
dav-4.0.2.tar.gz and dav-4.0.3.tar.gz

About: sabre/dav is a WebDAV framework for PHP allowing to create WebDAV, CalDAV and CardDAV servers.

JCalTransformTest.php  (dav-4.0.2):JCalTransformTest.php  (dav-4.0.3)
skipping to change at line 82 skipping to change at line 82
</d:prop> </d:prop>
<d:href>/calendars/user1/foo/bar.ics</d:href> <d:href>/calendars/user1/foo/bar.ics</d:href>
</c:calendar-multiget> </c:calendar-multiget>
XML; XML;
$headers = []; $headers = [];
$request = new Request('REPORT', '/calendars/user1/foo', $headers, $xml) ; $request = new Request('REPORT', '/calendars/user1/foo', $headers, $xml) ;
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(207, $response->getStatus(), 'Full rsponse: '.$respo $bodyAsString = $response->getBodyAsString();
nse->getBodyAsString()); $this->assertEquals(207, $response->getStatus(), 'Full rsponse: '.$bodyA
sString);
$multiStatus = $this->server->xml->parse( $multiStatus = $this->server->xml->parse($bodyAsString);
$response->getBodyAsString()
);
$responses = $multiStatus->getResponses(); $responses = $multiStatus->getResponses();
$this->assertEquals(1, count($responses)); $this->assertEquals(1, count($responses));
$response = $responses[0]->getResponseProperties()[200]['{urn:ietf:param s:xml:ns:caldav}calendar-data']; $response = $responses[0]->getResponseProperties()[200]['{urn:ietf:param s:xml:ns:caldav}calendar-data'];
$jresponse = json_decode($response, true); $jresponse = json_decode($response, true);
if (json_last_error()) { if (json_last_error()) {
$this->fail('Json decoding error: '.json_last_error_msg().'. Full re sponse: '.$response); $this->fail('Json decoding error: '.json_last_error_msg().'. Full re sponse: '.$response);
} }
skipping to change at line 134 skipping to change at line 133
</c:calendar-query> </c:calendar-query>
XML; XML;
$headers = [ $headers = [
'Depth' => '1', 'Depth' => '1',
]; ];
$request = new Request('REPORT', '/calendars/user1/foo', $headers, $xml) ; $request = new Request('REPORT', '/calendars/user1/foo', $headers, $xml) ;
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(207, $response->getStatus(), 'Invalid response code. $bodyAsString = $response->getBodyAsString();
Full body: '.$response->getBodyAsString()); $this->assertEquals(207, $response->getStatus(), 'Invalid response code.
Full body: '.$bodyAsString);
$multiStatus = $this->server->xml->parse( $multiStatus = $this->server->xml->parse($bodyAsString);
$response->getBodyAsString()
);
$responses = $multiStatus->getResponses(); $responses = $multiStatus->getResponses();
$this->assertEquals(1, count($responses)); $this->assertEquals(1, count($responses));
$response = $responses[0]->getResponseProperties()[200]['{urn:ietf:param s:xml:ns:caldav}calendar-data']; $response = $responses[0]->getResponseProperties()[200]['{urn:ietf:param s:xml:ns:caldav}calendar-data'];
$response = json_decode($response, true); $response = json_decode($response, true);
if (json_last_error()) { if (json_last_error()) {
$this->fail('Json decoding error: '.json_last_error_msg()); $this->fail('Json decoding error: '.json_last_error_msg());
} }
skipping to change at line 186 skipping to change at line 184
</c:calendar-query> </c:calendar-query>
XML; XML;
$headers = [ $headers = [
'Depth' => '0', 'Depth' => '0',
]; ];
$request = new Request('REPORT', '/calendars/user1/foo/bar.ics', $header s, $xml); $request = new Request('REPORT', '/calendars/user1/foo/bar.ics', $header s, $xml);
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(207, $response->getStatus(), 'Invalid response code. $bodyAsString = $response->getBodyAsString();
Full body: '.$response->getBodyAsString()); $this->assertEquals(207, $response->getStatus(), 'Invalid response code.
Full body: '.$bodyAsString);
$multiStatus = $this->server->xml->parse( $multiStatus = $this->server->xml->parse($bodyAsString);
$response->getBodyAsString()
);
$responses = $multiStatus->getResponses(); $responses = $multiStatus->getResponses();
$this->assertEquals(1, count($responses)); $this->assertEquals(1, count($responses));
$response = $responses[0]->getResponseProperties()[200]['{urn:ietf:param s:xml:ns:caldav}calendar-data']; $response = $responses[0]->getResponseProperties()[200]['{urn:ietf:param s:xml:ns:caldav}calendar-data'];
$response = json_decode($response, true); $response = json_decode($response, true);
if (json_last_error()) { if (json_last_error()) {
$this->fail('Json decoding error: '.json_last_error_msg()); $this->fail('Json decoding error: '.json_last_error_msg());
} }
 End of changes. 6 change blocks. 
15 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)