diff options
author | Robin Appelman <robin@icewind.nl> | 2016-09-20 11:45:06 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-10-12 16:12:34 +0200 |
commit | 7ce68ce6ac03f85532e312a68e61aaa0e09037ba (patch) | |
tree | ef9548d862c35656c0977a8ae1eb69883c6d7fce /apps | |
parent | 37eded7e7cda2ab421b573d3b6d9165a4fb9dc9a (diff) | |
download | nextcloud-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.php | 7 |
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(); |