"Fossies" - the Fresh Open Source Software Archive  

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

VCFExportTest.php  (dav-4.0.2):VCFExportTest.php  (dav-4.0.3)
skipping to change at line 60 skipping to change at line 60
public function testExport() public function testExport()
{ {
$request = HTTP\Sapi::createFromServerArray([ $request = HTTP\Sapi::createFromServerArray([
'REQUEST_URI' => '/addressbooks/user1/book1?export', 'REQUEST_URI' => '/addressbooks/user1/book1?export',
'QUERY_STRING' => 'export', 'QUERY_STRING' => 'export',
'REQUEST_METHOD' => 'GET', 'REQUEST_METHOD' => 'GET',
]); ]);
$response = $this->request($request); $response = $this->request($request);
$this->assertEquals(200, $response->status, $response->body); $this->assertEquals(200, $response->status, $response->getBodyAsString() );
$expected = 'BEGIN:VCARD $expected = 'BEGIN:VCARD
FN:Person1 FN:Person1
END:VCARD END:VCARD
BEGIN:VCARD BEGIN:VCARD
FN:Person2 FN:Person2
END:VCARD END:VCARD
BEGIN:VCARD BEGIN:VCARD
FN:Person3 FN:Person3
END:VCARD END:VCARD
BEGIN:VCARD BEGIN:VCARD
FN:Person4 FN:Person4
END:VCARD END:VCARD
'; ';
// We actually expected windows line endings // We actually expected windows line endings
$expected = str_replace("\n", "\r\n", $expected); $expected = str_replace("\n", "\r\n", $expected);
$this->assertEquals($expected, $response->body); $this->assertEquals($expected, $response->getBodyAsString());
} }
public function testBrowserIntegration() public function testBrowserIntegration()
{ {
$plugin = $this->server->getPlugin('vcf-export'); $plugin = $this->server->getPlugin('vcf-export');
$actions = ''; $actions = '';
$addressbook = new AddressBook($this->carddavBackend, []); $addressbook = new AddressBook($this->carddavBackend, []);
$this->server->emit('browserButtonActions', ['/foo', $addressbook, &$act ions]); $this->server->emit('browserButtonActions', ['/foo', $addressbook, &$act ions]);
$this->assertContains('/foo?export', $actions); $this->assertContains('/foo?export', $actions);
} }
 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)