summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-09-20 11:45:06 +0200
committerRobin Appelman <robin@icewind.nl>2016-10-12 16:12:34 +0200
commit7ce68ce6ac03f85532e312a68e61aaa0e09037ba (patch)
treeef9548d862c35656c0977a8ae1eb69883c6d7fce /apps
parent37eded7e7cda2ab421b573d3b6d9165a4fb9dc9a (diff)
downloadnextcloud-server-7ce68ce6ac03f85532e312a68e61aaa0e09037ba.tar.gz
nextcloud-server-7ce68ce6ac03f85532e312a68e61aaa0e09037ba.zip
phpunit is weird
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/tests/ApiTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index a62c29c5cad..19f3ad3b36b 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -29,6 +29,7 @@
namespace OCA\Files_Sharing\Tests;
+use OC\Files\Cache\Scanner;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCS\OCSForbiddenException;
@@ -72,6 +73,8 @@ class ApiTest extends TestCase {
$this->view->mkdir($this->folder . $this->subfolder . $this->subsubfolder);
$this->view->file_put_contents($this->folder.$this->filename, $this->data);
$this->view->file_put_contents($this->folder . $this->subfolder . $this->filename, $this->data);
+ $mount = $this->view->getMount($this->filename);
+ $mount->getStorage()->getScanner()->scan('', Scanner::SCAN_RECURSIVE);
$this->userFolder = \OC::$server->getUserFolder(self::TEST_FILES_SHARING_API_USER1);
}
@@ -113,10 +116,8 @@ class ApiTest extends TestCase {
);
}
- /**
- * @medium
- */
function testCreateShareUserFile() {
+ $this->setUp(); // for some reasons phpunit refuses to do this for us only for this test
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);
$ocs->cleanup();