summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/testcase.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/tests/testcase.php')
-rw-r--r--apps/files_sharing/tests/testcase.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/testcase.php
index 034baa785da..65fbfac7d1d 100644
--- a/apps/files_sharing/tests/testcase.php
+++ b/apps/files_sharing/tests/testcase.php
@@ -30,7 +30,7 @@ use OCA\Files\Share;
*
* Base class for sharing tests.
*/
-abstract class TestCase extends \PHPUnit_Framework_TestCase {
+abstract class TestCase extends \Test\TestCase {
const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
@@ -49,6 +49,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
public $subfolder;
public static function setUpBeforeClass() {
+ parent::setUpBeforeClass();
// remember files_encryption state
self::$stateFilesEncryption = \OC_App::isEnabled('files_encryption');
@@ -84,7 +85,8 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
}
- function setUp() {
+ protected function setUp() {
+ parent::setUp();
$this->assertFalse(\OC_App::isEnabled('files_encryption'));
@@ -95,13 +97,14 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
$this->view = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files');
}
- function tearDown() {
+ protected function tearDown() {
$query = \OCP\DB::prepare('DELETE FROM `*PREFIX*share`');
$query->execute();
+
+ parent::tearDown();
}
public static function tearDownAfterClass() {
-
// cleanup users
\OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER1);
\OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER2);
@@ -120,6 +123,8 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
\OC_Util::tearDownFS();
\OC_User::setUserId('');
Filesystem::tearDown();
+
+ parent::tearDownAfterClass();
}
/**