summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-01-09 14:25:48 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-06-04 12:22:23 +0200
commit76e04027bcc8f02aa665b960e229882f04986ee7 (patch)
tree191d768f81cda280b6cd93ebed6b7203cb48ec82 /tests
parentade6ed37976b405322e428df8c6697116fc9692f (diff)
downloadnextcloud-server-76e04027bcc8f02aa665b960e229882f04986ee7.tar.gz
nextcloud-server-76e04027bcc8f02aa665b960e229882f04986ee7.zip
Upgrade SabreDAV to 1.8.10
Updating SabreDAV namespaces
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/connector/sabre/aborteduploaddetectionplugin.php12
-rw-r--r--tests/lib/connector/sabre/directory.php6
-rw-r--r--tests/lib/connector/sabre/file.php8
-rw-r--r--tests/lib/connector/sabre/objecttree.php5
-rw-r--r--tests/lib/connector/sabre/quotaplugin.php12
5 files changed, 21 insertions, 22 deletions
diff --git a/tests/lib/connector/sabre/aborteduploaddetectionplugin.php b/tests/lib/connector/sabre/aborteduploaddetectionplugin.php
index 60d141e72bc..7e9f70ddcd3 100644
--- a/tests/lib/connector/sabre/aborteduploaddetectionplugin.php
+++ b/tests/lib/connector/sabre/aborteduploaddetectionplugin.php
@@ -9,7 +9,7 @@
class Test_OC_Connector_Sabre_AbortedUploadDetectionPlugin extends PHPUnit_Framework_TestCase {
/**
- * @var Sabre_DAV_Server
+ * @var \Sabre\DAV\Server
*/
private $server;
@@ -19,7 +19,7 @@ class Test_OC_Connector_Sabre_AbortedUploadDetectionPlugin extends PHPUnit_Frame
private $plugin;
private function init($view) {
- $this->server = new Sabre_DAV_Server();
+ $this->server = new \Sabre\DAV\Server();
$this->plugin = new OC_Connector_Sabre_AbortedUploadDetectionPlugin($view);
$this->plugin->initialize($this->server);
}
@@ -30,7 +30,7 @@ class Test_OC_Connector_Sabre_AbortedUploadDetectionPlugin extends PHPUnit_Frame
public function testLength($expected, $headers) {
$this->init(null);
- $this->server->httpRequest = new Sabre_HTTP_Request($headers);
+ $this->server->httpRequest = new \Sabre\HTTP\Request($headers);
$length = $this->plugin->getLength();
$this->assertEquals($expected, $length);
}
@@ -42,14 +42,14 @@ class Test_OC_Connector_Sabre_AbortedUploadDetectionPlugin extends PHPUnit_Frame
$this->init($this->buildFileViewMock($fileSize));
$headers['REQUEST_METHOD'] = $method;
- $this->server->httpRequest = new Sabre_HTTP_Request($headers);
+ $this->server->httpRequest = new Sabre\HTTP\Request($headers);
$this->plugin->verifyContentLength('foo.txt');
$this->assertTrue(true);
}
/**
* @dataProvider verifyContentLengthFailedProvider
- * @expectedException Sabre_DAV_Exception_BadRequest
+ * @expectedException \Sabre\DAV\Exception\BadRequest
*/
public function testVerifyContentLengthFailed($method, $fileSize, $headers) {
$view = $this->buildFileViewMock($fileSize);
@@ -58,7 +58,7 @@ class Test_OC_Connector_Sabre_AbortedUploadDetectionPlugin extends PHPUnit_Frame
$view->expects($this->once())->method('unlink');
$headers['REQUEST_METHOD'] = $method;
- $this->server->httpRequest = new Sabre_HTTP_Request($headers);
+ $this->server->httpRequest = new Sabre\HTTP\Request($headers);
$this->plugin->verifyContentLength('foo.txt');
}
diff --git a/tests/lib/connector/sabre/directory.php b/tests/lib/connector/sabre/directory.php
index b2bf0d4a6d2..8a1550ffa95 100644
--- a/tests/lib/connector/sabre/directory.php
+++ b/tests/lib/connector/sabre/directory.php
@@ -23,7 +23,7 @@ class Test_OC_Connector_Sabre_Directory extends PHPUnit_Framework_TestCase {
}
/**
- * @expectedException Sabre_DAV_Exception_Forbidden
+ * @expectedException \Sabre\DAV\Exception\Forbidden
*/
public function testCreateSharedFileFails() {
$dir = $this->getRootDir();
@@ -31,7 +31,7 @@ class Test_OC_Connector_Sabre_Directory extends PHPUnit_Framework_TestCase {
}
/**
- * @expectedException Sabre_DAV_Exception_Forbidden
+ * @expectedException \Sabre\DAV\Exception\Forbidden
*/
public function testCreateSharedFolderFails() {
$dir = $this->getRootDir();
@@ -39,7 +39,7 @@ class Test_OC_Connector_Sabre_Directory extends PHPUnit_Framework_TestCase {
}
/**
- * @expectedException Sabre_DAV_Exception_Forbidden
+ * @expectedException \Sabre\DAV\Exception\Forbidden
*/
public function testDeleteSharedFolderFails() {
$dir = $this->getRootDir();
diff --git a/tests/lib/connector/sabre/file.php b/tests/lib/connector/sabre/file.php
index a9056460a5c..3dd5b328f46 100644
--- a/tests/lib/connector/sabre/file.php
+++ b/tests/lib/connector/sabre/file.php
@@ -9,7 +9,7 @@
class Test_OC_Connector_Sabre_File extends PHPUnit_Framework_TestCase {
/**
- * @expectedException Sabre_DAV_Exception
+ * @expectedException \Sabre\DAV\Exception
*/
public function testSimplePutFails() {
// setup
@@ -33,7 +33,7 @@ class Test_OC_Connector_Sabre_File extends PHPUnit_Framework_TestCase {
}
/**
- * @expectedException Sabre_DAV_Exception
+ * @expectedException \Sabre\DAV\Exception
*/
public function testSimplePutFailsOnRename() {
// setup
@@ -62,7 +62,7 @@ class Test_OC_Connector_Sabre_File extends PHPUnit_Framework_TestCase {
}
/**
- * @expectedException Sabre_DAV_Exception_BadRequest
+ * @expectedException \Sabre\DAV\Exception\BadRequest
*/
public function testSimplePutInvalidChars() {
// setup
@@ -86,7 +86,7 @@ class Test_OC_Connector_Sabre_File extends PHPUnit_Framework_TestCase {
/**
* Test setting name with setName() with invalid chars
- * @expectedException Sabre_DAV_Exception_BadRequest
+ * @expectedException \Sabre\DAV\Exception\BadRequest
*/
public function testSetNameInvalidChars() {
// setup
diff --git a/tests/lib/connector/sabre/objecttree.php b/tests/lib/connector/sabre/objecttree.php
index bc8ec98faee..0075b7832b8 100644
--- a/tests/lib/connector/sabre/objecttree.php
+++ b/tests/lib/connector/sabre/objecttree.php
@@ -12,7 +12,6 @@ namespace Test\OC\Connector\Sabre;
use OC\Files\FileInfo;
use OC_Connector_Sabre_Directory;
use PHPUnit_Framework_TestCase;
-use Sabre_DAV_Exception_Forbidden;
class TestDoubleFileView extends \OC\Files\View{
@@ -43,7 +42,7 @@ class ObjectTree extends PHPUnit_Framework_TestCase {
/**
* @dataProvider moveFailedProvider
- * @expectedException Sabre_DAV_Exception_Forbidden
+ * @expectedException \Sabre\DAV\Exception\Forbidden
*/
public function testMoveFailed($source, $dest, $updatables, $deletables) {
$this->moveTest($source, $dest, $updatables, $deletables);
@@ -59,7 +58,7 @@ class ObjectTree extends PHPUnit_Framework_TestCase {
/**
* @dataProvider moveFailedInvalidCharsProvider
- * @expectedException Sabre_DAV_Exception_BadRequest
+ * @expectedException \Sabre\DAV\Exception\BadRequest
*/
public function testMoveFailedInvalidChars($source, $dest, $updatables, $deletables) {
$this->moveTest($source, $dest, $updatables, $deletables);
diff --git a/tests/lib/connector/sabre/quotaplugin.php b/tests/lib/connector/sabre/quotaplugin.php
index 6781b970a4f..1024ae6af8f 100644
--- a/tests/lib/connector/sabre/quotaplugin.php
+++ b/tests/lib/connector/sabre/quotaplugin.php
@@ -9,7 +9,7 @@
class Test_OC_Connector_Sabre_QuotaPlugin extends PHPUnit_Framework_TestCase {
/**
- * @var Sabre_DAV_Server
+ * @var \Sabre\DAV\Server
*/
private $server;
@@ -20,7 +20,7 @@ class Test_OC_Connector_Sabre_QuotaPlugin extends PHPUnit_Framework_TestCase {
private function init($quota) {
$view = $this->buildFileViewMock($quota);
- $this->server = new Sabre_DAV_Server();
+ $this->server = new \Sabre\DAV\Server();
$this->plugin = new OC_Connector_Sabre_QuotaPlugin($view);
$this->plugin->initialize($this->server);
}
@@ -30,7 +30,7 @@ class Test_OC_Connector_Sabre_QuotaPlugin extends PHPUnit_Framework_TestCase {
*/
public function testLength($expected, $headers) {
$this->init(0);
- $this->server->httpRequest = new Sabre_HTTP_Request($headers);
+ $this->server->httpRequest = new \Sabre\HTTP\Request($headers);
$length = $this->plugin->getLength();
$this->assertEquals($expected, $length);
}
@@ -41,19 +41,19 @@ class Test_OC_Connector_Sabre_QuotaPlugin extends PHPUnit_Framework_TestCase {
public function testCheckQuota($quota, $headers) {
$this->init($quota);
- $this->server->httpRequest = new Sabre_HTTP_Request($headers);
+ $this->server->httpRequest = new Sabre\HTTP\Request($headers);
$result = $this->plugin->checkQuota('');
$this->assertTrue($result);
}
/**
- * @expectedException Sabre_DAV_Exception_InsufficientStorage
+ * @expectedException \Sabre\DAV\Exception\InsufficientStorage
* @dataProvider quotaExceededProvider
*/
public function testCheckExceededQuota($quota, $headers) {
$this->init($quota);
- $this->server->httpRequest = new Sabre_HTTP_Request($headers);
+ $this->server->httpRequest = new Sabre\HTTP\Request($headers);
$this->plugin->checkQuota('');
}