aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
committerredmatrix <git@macgirvin.com>2016-05-10 17:26:44 -0700
commit0b02a6d123b2014705998c94ddf3d460948d3eac (patch)
tree78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php
parent40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff)
downloadvolse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2
volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php25
1 files changed, 21 insertions, 4 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php
index 84da59311..71fde719d 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/VCFExportTest.php
@@ -29,28 +29,35 @@ class VCFExportTest extends \Sabre\DAVServerTest {
function setUp() {
parent::setUp();
+ $plugin = new VCFExportPlugin();
$this->server->addPlugin(
- new VCFExportPlugin()
+ $plugin
);
}
function testSimple() {
- $this->assertInstanceOf('Sabre\\CardDAV\\VCFExportPlugin', $this->server->getPlugin('Sabre\\CardDAV\\VCFExportPlugin'));
+ $plugin = $this->server->getPlugin('vcf-export');
+ $this->assertInstanceOf('Sabre\\CardDAV\\VCFExportPlugin', $plugin);
+
+ $this->assertEquals(
+ 'vcf-export',
+ $plugin->getPluginInfo()['name']
+ );
}
function testExport() {
- $request = new HTTP\Request(array(
+ $request = HTTP\Sapi::createFromServerArray(array(
'REQUEST_URI' => '/addressbooks/user1/book1?export',
'QUERY_STRING' => 'export',
'REQUEST_METHOD' => 'GET',
));
$response = $this->request($request);
- $this->assertEquals('HTTP/1.1 200 OK', $response->status, $response->body);
+ $this->assertEquals(200, $response->status, $response->body);
$expected = "BEGIN:VCARD
FN:Person1
@@ -72,4 +79,14 @@ END:VCARD
}
+ function testBrowserIntegration() {
+
+ $plugin = $this->server->getPlugin('vcf-export');
+ $actions = '';
+ $addressbook = new AddressBook($this->carddavBackend, []);
+ $this->server->emit('browserButtonActions', ['/foo', $addressbook, &$actions]);
+ $this->assertContains('/foo?export', $actions);
+
+ }
+
}