diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-01-28 00:59:43 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-01-28 00:59:43 +0100 |
commit | 577e3b11d7b486d09334f39215814638704e84b9 (patch) | |
tree | 8b7833e3a731c04541ce35615b9aabc9b0795359 /tests/lib/files | |
parent | 4cae1416733019fe4c7465f3e167a456fb790502 (diff) | |
download | nextcloud-server-577e3b11d7b486d09334f39215814638704e84b9.tar.gz nextcloud-server-577e3b11d7b486d09334f39215814638704e84b9.zip |
Filesystem: return all matching mounts in Mount::findById
Diffstat (limited to 'tests/lib/files')
-rw-r--r-- | tests/lib/files/mount.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/lib/files/mount.php b/tests/lib/files/mount.php index 9f16b036275..f223f0f6c53 100644 --- a/tests/lib/files/mount.php +++ b/tests/lib/files/mount.php @@ -23,7 +23,8 @@ class Mount extends \PHPUnit_Framework_TestCase { $this->assertEquals($rootMount, \OC\Files\Mount::find('/')); $this->assertEquals($rootMount, \OC\Files\Mount::find('/foo/bar')); - $mount = new \OC\Files\Mount(new Temporary(array()), '/foo'); + $storage = new Temporary(array()); + $mount = new \OC\Files\Mount($storage, '/foo'); $this->assertEquals($rootMount, \OC\Files\Mount::find('/')); $this->assertEquals($mount, \OC\Files\Mount::find('/foo/bar')); @@ -32,6 +33,9 @@ class Mount extends \PHPUnit_Framework_TestCase { $this->assertEquals(2, count(\OC\Files\Mount::findIn('/'))); $id = $mount->getStorageId(); - $this->assertEquals($mount, \OC\Files\Mount::findById($id)); + $this->assertEquals(array($mount), \OC\Files\Mount::findById($id)); + + $mount2 = new \OC\Files\Mount($storage, '/foo/bar'); + $this->assertEquals(array($mount, $mount2), \OC\Files\Mount::findById($id)); } } |