test cases added for create/remove Shared folder and file
This commit is contained in:
parent
6e0e621218
commit
f62c4eafa5
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2013 Thomas Müller <thomas.mueller@tmit.eu>
|
||||||
|
* This file is licensed under the Affero General Public License version 3 or
|
||||||
|
* later.
|
||||||
|
* See the COPYING-README file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Test_OC_Connector_Sabre_Directory extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException Sabre_DAV_Exception_Forbidden
|
||||||
|
*/
|
||||||
|
public function testCreateSharedFileFails() {
|
||||||
|
$dir = new OC_Connector_Sabre_Directory('');
|
||||||
|
$dir->createFile('Shared');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException Sabre_DAV_Exception_Forbidden
|
||||||
|
*/
|
||||||
|
public function testCreateSharedFolderFails() {
|
||||||
|
$dir = new OC_Connector_Sabre_Directory('');
|
||||||
|
$dir->createDirectory('Shared');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException Sabre_DAV_Exception_Forbidden
|
||||||
|
*/
|
||||||
|
public function testDeleteSharedFolderFails() {
|
||||||
|
$dir = new OC_Connector_Sabre_Directory('Shared');
|
||||||
|
$dir->delete();
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,4 +35,11 @@ class Test_OC_Connector_Sabre_File extends PHPUnit_Framework_TestCase {
|
||||||
$etag = $file->put('test data');
|
$etag = $file->put('test data');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException Sabre_DAV_Exception_Forbidden
|
||||||
|
*/
|
||||||
|
public function testDeleteSharedFails() {
|
||||||
|
$file = new OC_Connector_Sabre_File('Shared');
|
||||||
|
$file->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue