aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/sharedmount.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/tests/sharedmount.php')
-rw-r--r--apps/files_sharing/tests/sharedmount.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/sharedmount.php b/apps/files_sharing/tests/sharedmount.php
index 715c22cf4ae..33fee2bd03e 100644
--- a/apps/files_sharing/tests/sharedmount.php
+++ b/apps/files_sharing/tests/sharedmount.php
@@ -141,14 +141,20 @@ class Test_Files_Sharing_Mount extends OCA\Files_sharing\Tests\TestCase {
self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
- \OC\Files\Filesystem::rename($this->filename, "newFileName");
+ \OC\Files\Filesystem::rename($this->filename, $this->filename . '_renamed');
- $this->assertTrue(\OC\Files\Filesystem::file_exists('newFileName'));
+ $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename . '_renamed'));
$this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename));
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
$this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename));
- $this->assertFalse(\OC\Files\Filesystem::file_exists("newFileName"));
+ $this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename . '_renamed'));
+
+ // rename back to original name
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
+ \OC\Files\Filesystem::rename($this->filename . '_renamed', $this->filename);
+ $this->assertFalse(\OC\Files\Filesystem::file_exists($this->filename . '_renamed'));
+ $this->assertTrue(\OC\Files\Filesystem::file_exists($this->filename));
//cleanup
\OCP\Share::unshare('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);