Fixed unit tests for files sharing watcher

This commit is contained in:
Vincent Petry 2013-11-06 09:39:52 +01:00
parent 9f4fd0161e
commit da126f1692
2 changed files with 3 additions and 3 deletions

View file

@ -29,7 +29,7 @@ use OCA\Files\Share;
*
* Base class for sharing tests.
*/
class Test_Files_Sharing_Base extends \PHPUnit_Framework_TestCase {
abstract class Test_Files_Sharing_Base extends \PHPUnit_Framework_TestCase {
const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";

View file

@ -55,12 +55,12 @@ class Test_Files_Sharing_Watcher extends Test_Files_Sharing_Base {
function tearDown() {
$this->sharedCache->clear();
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
$fileinfo = $this->view->getFileInfo('container/shareddir');
\OCP\Share::unshare('folder', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
self::TEST_FILES_SHARING_API_USER2);
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
$this->view->deleteAll('container');
$this->ownerCache->clear();