aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/ViewTest.php
diff options
context:
space:
mode:
authorStanimir Bozhilov <stanimir.bozhilov.1998@gmail.com>2022-12-19 09:07:38 +0100
committerGitHub <noreply@github.com>2022-12-19 09:07:38 +0100
commit7dcd6eb561f4bba7ed36ce1178c725278dd9b80e (patch)
tree8de1664f1a18df2e3b7b3dafadb3e0b6c3a8b439 /tests/lib/Files/ViewTest.php
parented902d58b62150a46c745b5e87c895fc3fc67509 (diff)
parente12aaa298861743f798d9adf644d626ac8e89a95 (diff)
downloadnextcloud-server-7dcd6eb561f4bba7ed36ce1178c725278dd9b80e.tar.gz
nextcloud-server-7dcd6eb561f4bba7ed36ce1178c725278dd9b80e.zip
Merge branch 'master' into add-scim-json-support
Signed-off-by: Stanimir Bozhilov <stanimir.bozhilov.1998@gmail.com>
Diffstat (limited to 'tests/lib/Files/ViewTest.php')
-rw-r--r--tests/lib/Files/ViewTest.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index 86101d79a1e..2189e7c09f4 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -2709,4 +2709,23 @@ class ViewTest extends \Test\TestCase {
$this->assertEquals(25, $info->getUploadTime());
$this->assertEquals(0, $info->getCreationTime());
}
+
+ public function testFopenGone() {
+ $storage = new Temporary([]);
+ $scanner = $storage->getScanner();
+ $storage->file_put_contents('foo.txt', 'bar');
+ $scanner->scan('');
+ $cache = $storage->getCache();
+
+ Filesystem::mount($storage, [], '/test/');
+ $view = new View('/test');
+
+ $storage->unlink('foo.txt');
+
+ $this->assertTrue($cache->inCache('foo.txt'));
+
+ $this->assertFalse($view->fopen('foo.txt', 'r'));
+
+ $this->assertFalse($cache->inCache('foo.txt'));
+ }
}