[Pkg-owncloud-commits] [php-sabredav] 69/275: Test for #474
David Prévot
taffit at moszumanska.debian.org
Thu Sep 25 14:55:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 12c231a80ebe26e1fa08659025e474d996077c5a
Author: Dominik Tobschall <dominik at fruux.com>
Date: Thu Jun 26 15:44:10 2014 +0200
Test for #474
---
tests/Sabre/DAV/PropertyStorage/PluginTest.php | 38 ++++++++++++++++++++++----
1 file changed, 33 insertions(+), 5 deletions(-)
diff --git a/tests/Sabre/DAV/PropertyStorage/PluginTest.php b/tests/Sabre/DAV/PropertyStorage/PluginTest.php
index 1e2f545..26c113e 100644
--- a/tests/Sabre/DAV/PropertyStorage/PluginTest.php
+++ b/tests/Sabre/DAV/PropertyStorage/PluginTest.php
@@ -6,16 +6,18 @@ class PluginTest extends \Sabre\DAVServerTest {
protected $backend;
+ protected $plugin;
+
function setUp() {
parent::setUp();
$this->backend = new Backend\Mock();
- $this->server->addPlugin(
- new Plugin(
- $this->backend
- )
+ $this->plugin = new Plugin(
+ $this->backend
);
+ $this->server->addPlugin($this->plugin);
+
}
function testSetProperty() {
@@ -46,13 +48,39 @@ class PluginTest extends \Sabre\DAVServerTest {
/**
* @depends testSetProperty
*/
- function testDelete() {
+ function testDeleteProperty() {
$this->testSetProperty();
$this->server->emit('afterUnbind', ['']);
$this->assertEquals([],$this->backend->data);
+ }
+
+ /**
+ * @depends testDeleteProperty
+ */
+ function testSetPropertyInFilteredPath() {
+
+ $this->plugin->pathFilter = function($path) {
+
+ return false;
+
+ };
+
+ $this->server->updateProperties('', ['{DAV:}displayname' => 'hi']);
+ $this->assertEquals([], $this->backend->data);
+
+ }
+
+ /**
+ * @depends testSetPropertyInFilteredPath
+ */
+ function testGetPropertyInFilteredPath() {
+
+ $this->testSetPropertyInFilteredPath();
+ $result = $this->server->getProperties('', ['{DAV:}displayname']);
+ $this->assertEquals([], $result);
}
}
--
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