Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-08 01:12:39 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-08 01:12:39 +0300
commita314924dab98bf74a3855edb733b023dc1aec875 (patch)
treed7768cbf56fd19a4e54a3b4ad7abaad779738d84 /tests
parent8b148c535a96083eb753fc1956bc72044c1bfc59 (diff)
Test getPathFromVirtualRoot with a folder
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/environment/EnvironmentSetupTest.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/integration/environment/EnvironmentSetupTest.php b/tests/integration/environment/EnvironmentSetupTest.php
index 0060f132..10a101bd 100644
--- a/tests/integration/environment/EnvironmentSetupTest.php
+++ b/tests/integration/environment/EnvironmentSetupTest.php
@@ -140,7 +140,7 @@ class EnvironmentSetupTest extends GalleryIntegrationTest {
/**
* You can pick any folder from $dataSetup->fileHierarchy
*/
- public function testGetPathFromVirtualRootAsALoggedInUser() {
+ public function testGetPathToFileFromVirtualRootAsALoggedInUser() {
$environment = $this->setUserBasedEnv();
$path = 'folder1/' . $this->sharedFolderName . '/testimage.gif';
@@ -149,7 +149,7 @@ class EnvironmentSetupTest extends GalleryIntegrationTest {
$this->assertEquals($path, $result);
}
- public function testGetPathFromVirtualRootAsATokenUser() {
+ public function testGetPathToFileFromVirtualRootAsATokenUser() {
$environment = $this->setTokenBasedEnv($this->sharedFolderToken);
$path = 'shared1.1/testimage.png';
@@ -158,6 +158,15 @@ class EnvironmentSetupTest extends GalleryIntegrationTest {
$this->assertEquals($path, $result);
}
+ public function testGetPathToFolderFromVirtualRootAsALoggedInUser() {
+ $environment = $this->setUserBasedEnv();
+
+ $path = 'folder1/' . $this->sharedFolderName;
+ $result = $environment->getPathFromVirtualRoot($this->userFolder->get($path));
+
+ $this->assertEquals($path, $result);
+ }
+
public function testGetPathFromUserFolderAsALoggedInUser() {
$environment = $this->setUserBasedEnv();