|
@@ 199-209 (lines=11) @@
|
| 196 |
|
/** |
| 197 |
|
* @medium |
| 198 |
|
*/ |
| 199 |
|
function testMountPointOverwrite() { |
| 200 |
|
$storage1 = $this->getTestStorage(false); |
| 201 |
|
$storage2 = $this->getTestStorage(); |
| 202 |
|
$storage1->mkdir('substorage'); |
| 203 |
|
\OC\Files\Filesystem::mount($storage1, array(), '/'); |
| 204 |
|
\OC\Files\Filesystem::mount($storage2, array(), '/substorage'); |
| 205 |
|
|
| 206 |
|
$rootView = new \OC\Files\View(''); |
| 207 |
|
$folderContent = $rootView->getDirectoryContent('/'); |
| 208 |
|
$this->assertEquals(4, count($folderContent)); |
| 209 |
|
} |
| 210 |
|
|
| 211 |
|
function testCacheIncompleteFolder() { |
| 212 |
|
$storage1 = $this->getTestStorage(false); |
|
@@ 211-223 (lines=13) @@
|
| 208 |
|
$this->assertEquals(4, count($folderContent)); |
| 209 |
|
} |
| 210 |
|
|
| 211 |
|
function testCacheIncompleteFolder() { |
| 212 |
|
$storage1 = $this->getTestStorage(false); |
| 213 |
|
\OC\Files\Filesystem::clearMounts(); |
| 214 |
|
\OC\Files\Filesystem::mount($storage1, array(), '/incomplete'); |
| 215 |
|
$rootView = new \OC\Files\View('/incomplete'); |
| 216 |
|
|
| 217 |
|
$entries = $rootView->getDirectoryContent('/'); |
| 218 |
|
$this->assertEquals(3, count($entries)); |
| 219 |
|
|
| 220 |
|
// /folder will already be in the cache but not scanned |
| 221 |
|
$entries = $rootView->getDirectoryContent('/folder'); |
| 222 |
|
$this->assertEquals(1, count($entries)); |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
public function testAutoScan() { |
| 226 |
|
$storage1 = $this->getTestStorage(false); |