diff --git a/apps/files_sharing/tests/base.php b/apps/files_sharing/tests/base.php index 0c7c5937fa..689c80cb9e 100644 --- a/apps/files_sharing/tests/base.php +++ b/apps/files_sharing/tests/base.php @@ -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"; diff --git a/apps/files_sharing/tests/watcher.php b/apps/files_sharing/tests/watcher.php index 63f38894c7..1a9a54cbcf 100644 --- a/apps/files_sharing/tests/watcher.php +++ b/apps/files_sharing/tests/watcher.php @@ -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();