[Pkg-owncloud-commits] [php-sabredav] 48/80: A few more tests

David Prévot taffit at moszumanska.debian.org
Thu Jan 7 02:56:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 4ae540206f396a6a3761581e341def103d0ab10e
Author: Evert Pot <me at evertpot.com>
Date:   Mon Jan 4 17:31:22 2016 -0500

    A few more tests
---
 tests/Sabre/CalDAV/ICSExportPluginTest.php |  1 +
 tests/Sabre/CardDAV/VCFExportTest.php      | 21 +++++++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/tests/Sabre/CalDAV/ICSExportPluginTest.php b/tests/Sabre/CalDAV/ICSExportPluginTest.php
index f7e4432..c123bd0 100644
--- a/tests/Sabre/CalDAV/ICSExportPluginTest.php
+++ b/tests/Sabre/CalDAV/ICSExportPluginTest.php
@@ -24,6 +24,7 @@ class ICSExportPluginTest extends \PHPUnit_Framework_TestCase {
         $s = new DAV\Server();
         $s->addPlugin($p);
         $this->assertEquals($p, $s->getPlugin('ics-export'));
+        $this->assertEquals('ics-export', $p->getPluginInfo()['name']);
 
     }
 
diff --git a/tests/Sabre/CardDAV/VCFExportTest.php b/tests/Sabre/CardDAV/VCFExportTest.php
index 54c3a84..71fde71 100644
--- a/tests/Sabre/CardDAV/VCFExportTest.php
+++ b/tests/Sabre/CardDAV/VCFExportTest.php
@@ -29,15 +29,22 @@ 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('vcf-export'));
+        $plugin = $this->server->getPlugin('vcf-export');
+        $this->assertInstanceOf('Sabre\\CardDAV\\VCFExportPlugin', $plugin);
+
+        $this->assertEquals(
+            'vcf-export',
+            $plugin->getPluginInfo()['name']
+        );
 
     }
 
@@ -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);
+
+    }
+
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list