"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/Sabre/CardDAV/MultiGetTest.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.

MultiGetTest.php  (dav-4.0.2):MultiGetTest.php  (dav-4.0.3)
skipping to change at line 39 skipping to change at line 39
</c:addressbook-multiget>' </c:addressbook-multiget>'
); );
$response = new HTTP\ResponseMock(); $response = new HTTP\ResponseMock();
$this->server->httpRequest = $request; $this->server->httpRequest = $request;
$this->server->httpResponse = $response; $this->server->httpResponse = $response;
$this->server->exec(); $this->server->exec();
$this->assertEquals(207, $response->status, 'Incorrect status code. Full $bodyAsString = $response->getBodyAsString();
response body:'.$response->body); $this->assertEquals(207, $response->status, 'Incorrect status code. Full
response body:'.$bodyAsString);
// using the client for parsing // using the client for parsing
$client = new DAV\Client(['baseUri' => '/']); $client = new DAV\Client(['baseUri' => '/']);
$result = $client->parseMultiStatus($response->body); $result = $client->parseMultiStatus($bodyAsString);
$this->assertEquals([ $this->assertEquals([
'/addressbooks/user1/book1/card1' => [ '/addressbooks/user1/book1/card1' => [
200 => [ 200 => [
'{DAV:}getetag' => '"'.md5("BEGIN:VCARD\nVERSION:3.0\nUID:12 345\nEND:VCARD").'"', '{DAV:}getetag' => '"'.md5("BEGIN:VCARD\nVERSION:3.0\nUID:12 345\nEND:VCARD").'"',
'{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCA RD\nVERSION:3.0\nUID:12345\nEND:VCARD", '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCA RD\nVERSION:3.0\nUID:12345\nEND:VCARD",
], ],
], ],
], $result); ], $result);
} }
skipping to change at line 81 skipping to change at line 82
</c:addressbook-multiget>' </c:addressbook-multiget>'
); );
$response = new HTTP\ResponseMock(); $response = new HTTP\ResponseMock();
$this->server->httpRequest = $request; $this->server->httpRequest = $request;
$this->server->httpResponse = $response; $this->server->httpResponse = $response;
$this->server->exec(); $this->server->exec();
$this->assertEquals(207, $response->status, 'Incorrect status code. Full $bodyAsString = $response->getBodyAsString();
response body:'.$response->body); $this->assertEquals(207, $response->status, 'Incorrect status code. Full
response body:'.$bodyAsString);
// using the client for parsing // using the client for parsing
$client = new DAV\Client(['baseUri' => '/']); $client = new DAV\Client(['baseUri' => '/']);
$result = $client->parseMultiStatus($response->body); $result = $client->parseMultiStatus($bodyAsString);
$prodId = 'PRODID:-//Sabre//Sabre VObject '.\Sabre\VObject\Version::VERS ION.'//EN'; $prodId = 'PRODID:-//Sabre//Sabre VObject '.\Sabre\VObject\Version::VERS ION.'//EN';
$this->assertEquals([ $this->assertEquals([
'/addressbooks/user1/book1/card1' => [ '/addressbooks/user1/book1/card1' => [
200 => [ 200 => [
'{DAV:}getetag' => '"'.md5("BEGIN:VCARD\nVERSION:3.0\nUID:12 345\nEND:VCARD").'"', '{DAV:}getetag' => '"'.md5("BEGIN:VCARD\nVERSION:3.0\nUID:12 345\nEND:VCARD").'"',
'{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCA RD\r\nVERSION:4.0\r\n$prodId\r\nUID:12345\r\nEND:VCARD\r\n", '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCA RD\r\nVERSION:4.0\r\n$prodId\r\nUID:12345\r\nEND:VCARD\r\n",
], ],
], ],
 End of changes. 4 change blocks. 
6 lines changed or deleted 8 lines changed or added

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