summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/testcase.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-10 22:28:12 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-19 14:52:09 +0100
commit76ebd3a050cb3c84b958f071ec559e6bc9cbc847 (patch)
tree5d781de62a647778ac377e8a1173dea82427328d /apps/files_sharing/tests/testcase.php
parentbb540722cd4e197bd608d9a87e4b10cf66dec5a9 (diff)
downloadnextcloud-server-76ebd3a050cb3c84b958f071ec559e6bc9cbc847.tar.gz
nextcloud-server-76ebd3a050cb3c84b958f071ec559e6bc9cbc847.zip
Make apps/ extend the \Test\TestCase and fix overwritten methods
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();
}
/**