diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 12:46:07 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:31 +0200 |
commit | 54a3bdf1c5cab73fd9fbedbfb94c78c9f720855b (patch) | |
tree | f3bc10b3143d1e187e2987060f6acedd5c3eb945 /tests | |
parent | 268d346b369f5afb630decb3e9b4e6cd9a7c124f (diff) | |
download | nextcloud-server-54a3bdf1c5cab73fd9fbedbfb94c78c9f720855b.tar.gz nextcloud-server-54a3bdf1c5cab73fd9fbedbfb94c78c9f720855b.zip |
fixing unit test execution related to trashbin
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/avatar.php | 13 | ||||
-rw-r--r-- | tests/lib/streamwrappers.php | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/lib/avatar.php b/tests/lib/avatar.php index e852a7fc6ff..9e1f367108d 100644 --- a/tests/lib/avatar.php +++ b/tests/lib/avatar.php @@ -10,7 +10,9 @@ use OC\Avatar; class Test_Avatar extends \Test\TestCase { + private static $trashBinStatus; + /** @var @var string */ private $user; protected function setUp() { @@ -21,6 +23,17 @@ class Test_Avatar extends \Test\TestCase { \OC\Files\Filesystem::mount($storage, array(), '/' . $this->user . '/'); } + public static function setUpBeforeClass() { + self::$trashBinStatus = \OC_App::isEnabled('files_trashbin'); + \OC_App::disable('files_trashbin'); + } + + public static function tearDownAfterClass() { + if (self::$trashBinStatus) { + \OC_App::enable('files_trashbin'); + } + } + public function testAvatar() { $avatar = new Avatar($this->user); diff --git a/tests/lib/streamwrappers.php b/tests/lib/streamwrappers.php index 2a8c8676c16..fc3d02acae7 100644 --- a/tests/lib/streamwrappers.php +++ b/tests/lib/streamwrappers.php @@ -21,6 +21,20 @@ */ class Test_StreamWrappers extends \Test\TestCase { + + private static $trashBinStatus; + + public static function setUpBeforeClass() { + self::$trashBinStatus = \OC_App::isEnabled('files_trashbin'); + \OC_App::disable('files_trashbin'); + } + + public static function tearDownAfterClass() { + if (self::$trashBinStatus) { + \OC_App::enable('files_trashbin'); + } + } + public function testFakeDir() { $items = array('foo', 'bar'); \OC\Files\Stream\Dir::register('test', $items); |