Definition at line 7 of file VCFExportTest.php.
◆ setUp()
Sabre\CardDAV\VCFExportTest::setUp |
( |
| ) |
|
Definition at line 29 of file VCFExportTest.php.
32 $plugin =
new VCFExportPlugin();
33 $this->server->addPlugin(
◆ testBrowserIntegration()
Sabre\CardDAV\VCFExportTest::testBrowserIntegration |
( |
| ) |
|
Definition at line 82 of file VCFExportTest.php.
84 $plugin = $this->server->getPlugin(
'vcf-export');
86 $addressbook =
new AddressBook($this->carddavBackend, []);
87 $this->server->emit(
'browserButtonActions', [
'/foo', $addressbook, &$actions]);
88 $this->assertContains(
'/foo?export', $actions);
◆ testContentDisposition()
Sabre\CardDAV\VCFExportTest::testContentDisposition |
( |
| ) |
|
Definition at line 92 of file VCFExportTest.php.
References $request, $response, and Sabre\DAVServerTest\request().
96 '/addressbooks/user1/book1?export' 100 $this->assertEquals(
'text/directory',
$response->getHeader(
'Content-Type'));
102 'attachment; filename="book1-' . date(
'Y-m-d') .
'.vcf"',
103 $response->getHeader(
'Content-Disposition')
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testContentDispositionBadChars()
Sabre\CardDAV\VCFExportTest::testContentDispositionBadChars |
( |
| ) |
|
Definition at line 108 of file VCFExportTest.php.
References $request, $response, and Sabre\DAVServerTest\request().
110 $this->carddavBackend->createAddressBook(
115 $this->carddavBackend->createCard(
118 "BEGIN:VCARD\r\nFN:Person1\r\nEND:VCARD\r\n" 123 '/addressbooks/user1/book-b_ad"(ch)ars?export' 127 $this->assertEquals(
'text/directory',
$response->getHeader(
'Content-Type'));
129 'attachment; filename="book-b_adchars-' . date(
'Y-m-d') .
'.vcf"',
130 $response->getHeader(
'Content-Disposition')
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
◆ testExport()
Sabre\CardDAV\VCFExportTest::testExport |
( |
| ) |
|
Definition at line 51 of file VCFExportTest.php.
References $request, $response, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAVServerTest\request().
54 'REQUEST_URI' =>
'/addressbooks/user1/book1?export',
55 'QUERY_STRING' =>
'export',
56 'REQUEST_METHOD' =>
'GET',
62 $expected =
"BEGIN:VCARD 76 $expected = str_replace(
"\n",
"\r\n", $expected);
78 $this->assertEquals($expected,
$response->body);
foreach($paths as $path) $request
request($request, $expectedStatus=null)
Makes a request, and returns a response object.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testSimple()
Sabre\CardDAV\VCFExportTest::testSimple |
( |
| ) |
|
Definition at line 39 of file VCFExportTest.php.
41 $plugin = $this->server->getPlugin(
'vcf-export');
42 $this->assertInstanceOf(
'Sabre\\CardDAV\\VCFExportPlugin', $plugin);
46 $plugin->getPluginInfo()[
'name']
◆ $autoLogin
Sabre\CardDAV\VCFExportTest::$autoLogin = 'user1' |
|
protected |
◆ $carddavAddressBooks
Sabre\CardDAV\VCFExportTest::$carddavAddressBooks |
|
protected |
Initial value:= [
[
'id' => 'book1',
'uri' => 'book1'
Definition at line 13 of file VCFExportTest.php.
◆ $carddavCards
Sabre\CardDAV\VCFExportTest::$carddavCards |
|
protected |
Initial value:= [
'book1' => [
"card1" => "BEGIN:VCARD\r\nFN:Person1\r\nEND:VCARD\r\n"
Definition at line 20 of file VCFExportTest.php.
◆ $setupACL
Sabre\CardDAV\VCFExportTest::$setupACL = true |
|
protected |
◆ $setupCardDAV
Sabre\CardDAV\VCFExportTest::$setupCardDAV = true |
|
protected |
◆ card2
Sabre\CardDAV\VCFExportTest::card2 |
Initial value:=> "BEGIN:VCARD\r\nFN:Person2\r\nEND:VCARD",
"card3" => "BEGIN:VCARD\r\nFN:Person3\r\nEND:VCARD\r\n",
"card4" => "BEGIN:VCARD\nFN:Person4\nEND:VCARD\n",
]
]
Definition at line 23 of file VCFExportTest.php.
The documentation for this class was generated from the following file: