Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-28 12:21:26 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-28 12:21:26 +0300
commit24271cf95358b294180f2cec80a0f71733b9e250 (patch)
tree912642e4238531f2c2002e4bd26bdb2271a736d3 /tests
parenteb509bcbe6d6b97133a7b4dfba81325e92500aed (diff)
parent667d7383e159d12102d2bf519ca2215681865aa9 (diff)
Merge pull request #21216 from owncloud/fopen-statcache
Clear SMB statcache after fopen
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/storage.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index d381b4cdf40..95dd70bfdac 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -598,4 +598,17 @@ abstract class Storage extends \Test\TestCase {
$this->instance->mkdir('source');
$this->assertTrue($this->instance->isSharable('source'));
}
+
+ public function testStatAfterWrite() {
+ $this->instance->file_put_contents('foo.txt', 'bar');
+ $stat = $this->instance->stat('foo.txt');
+ $this->assertEquals(3, $stat['size']);
+
+ $fh = $this->instance->fopen('foo.txt', 'w');
+ fwrite($fh, 'qwerty');
+ fclose($fh);
+
+ $stat = $this->instance->stat('foo.txt');
+ $this->assertEquals(6, $stat['size']);
+ }
}