From dcc65bbacb81801b5e138795c18ef9e740dbd26c Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 28 Jun 2016 21:45:14 +0200 Subject: update to sabre/dav to version 3.2.0 --- .../dav/tests/Sabre/DAV/Auth/Backend/FileTest.php | 3 +-- vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php | 19 +++++++++++++++++++ vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php | 4 +++- 3 files changed, 23 insertions(+), 3 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV') 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 @@ -48,6 +48,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 */ 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']); -- cgit v1.2.3