aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php142
1 files changed, 0 insertions, 142 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php
index afcd5c98f..21e0ab2ea 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/ServerSimpleTest.php
@@ -175,148 +175,6 @@ class ServerSimpleTest extends AbstractServer{
}
- function testPut() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/testput.txt',
- 'REQUEST_METHOD' => 'PUT',
- );
-
- $request = new HTTP\Request($serverVars);
- $request->setBody('Testing new file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('', $this->response->body);
- $this->assertEquals('HTTP/1.1 201 Created',$this->response->status);
- $this->assertEquals(array(
- "Content-Length" => "0",
- ), $this->response->headers);
-
- $this->assertEquals('Testing new file',file_get_contents($this->tempDir . '/testput.txt'));
-
- }
-
- function testPutAlreadyExists() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/test.txt',
- 'REQUEST_METHOD' => 'PUT',
- 'HTTP_IF_NONE_MATCH' => '*',
- );
-
- $request = new HTTP\Request($serverVars);
- $request->setBody('Testing new file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals(array(
- 'Content-Type' => 'application/xml; charset=utf-8',
- ),$this->response->headers);
-
- $this->assertEquals('HTTP/1.1 412 Precondition failed',$this->response->status);
- $this->assertNotEquals('Testing new file',file_get_contents($this->tempDir . '/test.txt'));
-
- }
-
- function testPutUpdate() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/test.txt',
- 'REQUEST_METHOD' => 'PUT',
- );
-
- $request = new HTTP\Request($serverVars);
- $request->setBody('Testing updated file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('0', $this->response->headers['Content-Length']);
-
- $this->assertEquals('HTTP/1.1 204 No Content',$this->response->status);
- $this->assertEquals('', $this->response->body);
- $this->assertEquals('Testing updated file',file_get_contents($this->tempDir . '/test.txt'));
-
- }
-
- function testPutNoParentCollection() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/test.txt/item.txt',
- 'REQUEST_METHOD' => 'PUT',
- );
-
- $request = new HTTP\Request($serverVars);
- $request->setBody('Testing updated file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('HTTP/1.1 409 Conflict',$this->response->status);
-
- }
-
- function testPutContentRange() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/testput.txt',
- 'REQUEST_METHOD' => 'PUT',
- 'HTTP_CONTENT_RANGE' => 'bytes/100-200',
- );
-
- $request = new HTTP\Request($serverVars);
- $request->setBody('Testing new file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('HTTP/1.1 501 Not Implemented',$this->response->status);
-
- }
-
-
- function testDelete() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/test.txt',
- 'REQUEST_METHOD' => 'DELETE',
- );
-
- $request = new HTTP\Request($serverVars);
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals(array(
- 'Content-Length' => '0',
- ),$this->response->headers);
-
- $this->assertEquals('HTTP/1.1 204 No Content',$this->response->status);
- $this->assertEquals('', $this->response->body);
- $this->assertFalse(file_exists($this->tempDir . '/test.txt'));
-
- }
-
- function testDeleteDirectory() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/testcol',
- 'REQUEST_METHOD' => 'DELETE',
- );
-
- mkdir($this->tempDir.'/testcol');
- file_put_contents($this->tempDir.'/testcol/test.txt','Hi! I\'m a file with a short lifespan');
-
- $request = new HTTP\Request($serverVars);
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals(array(
- 'Content-Length' => '0',
- ),$this->response->headers);
- $this->assertEquals('HTTP/1.1 204 No Content',$this->response->status);
- $this->assertEquals('', $this->response->body);
- $this->assertFalse(file_exists($this->tempDir . '/col'));
-
- }
-
function testOptions() {
$serverVars = array(