diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-10-27 12:29:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 12:29:17 +0200 |
commit | 220d71d99798df9d64873be0d67a35989258754e (patch) | |
tree | 17e373dcb16d4e2267d5413501d5519a44f9a726 /tests/lib | |
parent | a117878240a27fe8e400b04e97a5a1d4be35e42c (diff) | |
parent | 8cf947f0dae66649359aac190f1bcd8b5c37cd6b (diff) | |
download | nextcloud-server-220d71d99798df9d64873be0d67a35989258754e.tar.gz nextcloud-server-220d71d99798df9d64873be0d67a35989258754e.zip |
Merge pull request #34410 from nextcloud/backport/33566/stable24
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/Files/ViewTest.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 7b735720ff1..d33007cfa8a 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -2722,4 +2722,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')); + } } |