aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/tests
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_trashbin/tests
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_trashbin/tests')
-rw-r--r--apps/files_trashbin/tests/trashbin.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php
index 6fdb53f7271..f572e22623e 100644
--- a/apps/files_trashbin/tests/trashbin.php
+++ b/apps/files_trashbin/tests/trashbin.php
@@ -25,7 +25,7 @@ use OCA\Files_Trashbin;
/**
* Class Test_Encryption_Crypt
*/
-class Test_Trashbin extends \PHPUnit_Framework_TestCase {
+class Test_Trashbin extends \Test\TestCase {
const TEST_TRASHBIN_USER1 = "test-trashbin-user1";
const TEST_TRASHBIN_USER2 = "test-trashbin-user2";
@@ -43,6 +43,8 @@ class Test_Trashbin extends \PHPUnit_Framework_TestCase {
private $rootView;
public static function setUpBeforeClass() {
+ parent::setUpBeforeClass();
+
// reset backend
\OC_User::clearBackends();
\OC_User::useBackend('database');
@@ -85,18 +87,24 @@ class Test_Trashbin extends \PHPUnit_Framework_TestCase {
\OC_Config::setValue('trashbin_auto_expire', self::$rememberAutoExpire);
\OC_Hook::clear();
+
+ parent::tearDownAfterClass();
}
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->trashRoot1 = '/' . self::TEST_TRASHBIN_USER1 . '/files_trashbin';
$this->trashRoot2 = '/' . self::TEST_TRASHBIN_USER2 . '/files_trashbin';
$this->rootView = new \OC\Files\View();
self::loginHelper(self::TEST_TRASHBIN_USER1);
}
- public function tearDown() {
+ protected function tearDown() {
$this->rootView->deleteAll($this->trashRoot1);
$this->rootView->deleteAll($this->trashRoot2);
+
+ parent::tearDown();
}
/**