"Fossies" - the Fresh Open Source Software Archive  

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

ValidateVCardTest.php  (dav-4.0.2):ValidateVCardTest.php  (dav-4.0.3)
skipping to change at line 243 skipping to change at line 243
public function testCreateFileJson() public function testCreateFileJson()
{ {
$request = new HTTP\Request( $request = new HTTP\Request(
'PUT', 'PUT',
'/addressbooks/admin/addressbook1/blabla.vcf' '/addressbooks/admin/addressbook1/blabla.vcf'
); );
$request->setBody('[ "vcard" , [ [ "VERSION", {}, "text", "4.0"], [ "UID " , {}, "text", "foo" ], [ "FN", {}, "text", "FirstName LastName"] ] ]'); $request->setBody('[ "vcard" , [ [ "VERSION", {}, "text", "4.0"], [ "UID " , {}, "text", "foo" ], [ "FN", {}, "text", "FirstName LastName"] ] ]');
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->body); $this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString());
$foo = $this->cardBackend->getCard('addressbook1', 'blabla.vcf'); $foo = $this->cardBackend->getCard('addressbook1', 'blabla.vcf');
$this->assertEquals("BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nFN:FirstNa me LastName\r\nEND:VCARD\r\n", $foo['carddata']); $this->assertEquals("BEGIN:VCARD\r\nVERSION:4.0\r\nUID:foo\r\nFN:FirstNa me LastName\r\nEND:VCARD\r\n", $foo['carddata']);
} }
public function testCreateFileVCalendar() public function testCreateFileVCalendar()
{ {
$request = HTTP\Sapi::createFromServerArray([ $request = HTTP\Sapi::createFromServerArray([
'REQUEST_METHOD' => 'PUT', 'REQUEST_METHOD' => 'PUT',
'REQUEST_URI' => '/addressbooks/admin/addressbook1/blabla.vcf', 'REQUEST_URI' => '/addressbooks/admin/addressbook1/blabla.vcf',
]); ]);
$request->setBody("BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n"); $request->setBody("BEGIN:VCALENDAR\r\nEND:VCALENDAR\r\n");
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->body); $this->assertEquals(415, $response->status, 'Incorrect status returned! Full response body: '.$response->getBodyAsString());
} }
public function testUpdateFile() public function testUpdateFile()
{ {
$this->cardBackend->createCard('addressbook1', 'blabla.vcf', 'foo'); $this->cardBackend->createCard('addressbook1', 'blabla.vcf', 'foo');
$request = new HTTP\Request( $request = new HTTP\Request(
'PUT', 'PUT',
'/addressbooks/admin/addressbook1/blabla.vcf' '/addressbooks/admin/addressbook1/blabla.vcf'
); );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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