diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-04-22 18:05:30 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-05-07 23:51:10 +0400 |
commit | d2dbab21fb2e13498c30533740fd64428134616d (patch) | |
tree | e12986806cd6ea677a0d3b8dac2d615002b9b4a9 /tests | |
parent | a152f3a50fbae79c2fae98cf013aa71ca82174fb (diff) |
Fix getPath for storage roots
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/view.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index 72a2f854cb2..d793aebffab 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -150,6 +150,22 @@ class View extends \PHPUnit_Framework_TestCase { /** * @medium */ + function testGetPathStorageRoot() { + $storage1 = $this->getTestStorage(); + $storage2 = $this->getTestStorage(); + \OC\Files\Filesystem::mount($storage1, array(), '/'); + \OC\Files\Filesystem::mount($storage2, array(), '/substorage'); + + $rootView = new \OC\Files\View(''); + + $cachedData = $rootView->getFileInfo('/substorage'); + $id1 = $cachedData['fileid']; + $this->assertEquals('/substorage', $rootView->getPath($id1)); + } + + /** + * @medium + */ function testMountPointOverwrite() { $storage1 = $this->getTestStorage(false); $storage2 = $this->getTestStorage(); |