aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-28 21:45:14 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-28 21:45:14 +0200
commitdcc65bbacb81801b5e138795c18ef9e740dbd26c (patch)
tree52f0e3879dac66ee7879abeb8c6db9cd6eb0b33c /vendor/sabre/dav/tests
parentfeaad50b6c10cd19cffb63609d6eeada3d185fd7 (diff)
downloadvolse-hubzilla-dcc65bbacb81801b5e138795c18ef9e740dbd26c.tar.gz
volse-hubzilla-dcc65bbacb81801b5e138795c18ef9e740dbd26c.tar.bz2
volse-hubzilla-dcc65bbacb81801b5e138795c18ef9e740dbd26c.zip
update to sabre/dav to version 3.2.0
Diffstat (limited to 'vendor/sabre/dav/tests')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php10
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php3
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php19
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php4
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php7
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php55
6 files changed, 95 insertions, 3 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
index 35d6da353..2a00f7925 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
@@ -1418,4 +1418,14 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
}
+ /**
+ * @expectedException \Sabre\DAV\Exception\NotImplemented
+ */
+ function testSetPublishStatus() {
+
+ $backend = new PDO($this->pdo);
+ $backend->setPublishStatus([1, 1], true);
+
+ }
+
}
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php
index 9b66d642f..f694f4806 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/FileTest.php
@@ -23,8 +23,7 @@ class FileTest extends \PHPUnit_Framework_TestCase {
function testLoadFileBroken() {
file_put_contents(SABRE_TEMPDIR . '/backend', 'user:realm:hash');
- $file = new File();
- $file->loadFile(SABRE_TEMPDIR . '/backend');
+ $file = new File(SABRE_TEMPDIR . '/backend');
}
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php
index 3ed79a7da..b566dd757 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php
@@ -49,6 +49,25 @@ class PluginTest extends \PHPUnit_Framework_TestCase {
}
/**
+ * @depends testAuthenticateFail
+ */
+ function testAuthenticateFailDontAutoRequire() {
+
+ $fakeServer = new DAV\Server(new DAV\SimpleCollection('bla'));
+ $backend = new Backend\Mock();
+ $backend->fail = true;
+
+ $plugin = new Plugin($backend);
+ $plugin->autoRequireLogin = false;
+ $fakeServer->addPlugin($plugin);
+ $this->assertTrue(
+ $fakeServer->emit('beforeMethod', [new HTTP\Request(), new HTTP\Response()])
+ );
+ $this->assertEquals(1, count($plugin->getLoginFailedReasons()));
+
+ }
+
+ /**
* @depends testAuthenticate
*/
function testMultipleBackend() {
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php
index 6ac20d2da..4c576f108 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php
@@ -31,7 +31,9 @@ class ServerEventsTest extends AbstractServer {
function testAfterResponse() {
- $mock = $this->getMock('stdClass', ['afterResponseCallback']);
+ $mock = $this->getMockBuilder('stdClass')
+ ->setMethods(['afterResponseCallback'])
+ ->getMock();
$mock->expects($this->once())->method('afterResponseCallback');
$this->server->on('afterResponse', [$mock, 'afterResponseCallback']);
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php
index 0612b5474..91de64372 100644
--- a/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAVACL/ExpandPropertiesTest.php
@@ -34,6 +34,13 @@ class ExpandPropertiesTest extends \PHPUnit_Framework_TestCase {
$fakeServer->httpResponse = new HTTP\ResponseMock();
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
+ // Anyone can do anything
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ]
+ ]);
$this->assertTrue($plugin instanceof Plugin);
$fakeServer->addPlugin($plugin);
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php
index 5762ac902..fb42efba7 100644
--- a/vendor/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PluginPropertiesTest.php
@@ -11,6 +11,13 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
+ //Anyone can do anything
$plugin->principalCollectionSet = [
'principals1',
'principals2',
@@ -47,6 +54,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
$plugin = new DAV\Auth\Plugin(new DAV\Auth\Backend\Mock());
$fakeServer->addPlugin($plugin);
$plugin = new Plugin();
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$fakeServer->addPlugin($plugin);
@@ -80,6 +93,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$server = new DAV\Server();
$server->addPlugin($plugin);
@@ -140,6 +159,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$nodes = [
new MockACLNode('foo', [
@@ -227,6 +252,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
//$fakeServer->addPlugin($plugin);
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$fakeServer->addPlugin($plugin);
$requestedProperties = [
@@ -256,6 +287,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
//$fakeServer->addPlugin($plugin);
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$fakeServer->addPlugin($plugin);
$requestedProperties = [
@@ -286,6 +323,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
//$fakeServer->addPlugin($plugin);
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$fakeServer->addPlugin($plugin);
$requestedProperties = [
@@ -315,6 +358,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
$fakeServer->addPlugin($plugin);
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$requestedProperties = [
'{DAV:}group-membership',
@@ -343,6 +392,12 @@ class PluginPropertiesTest extends \PHPUnit_Framework_TestCase {
$plugin = new Plugin();
$plugin->allowUnauthenticatedAccess = false;
$fakeServer->addPlugin($plugin);
+ $plugin->setDefaultACL([
+ [
+ 'principal' => '{DAV:}all',
+ 'privilege' => '{DAV:}all',
+ ],
+ ]);
$requestedProperties = [
'{DAV:}displayname',