diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-15 13:48:17 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-12-15 13:48:17 +0100 |
commit | 38a2467a4f6344affc17a4c21862b047bfdf51e1 (patch) | |
tree | fb09c6240585ad0e8d5bfe35d6675e4b0e51f00c | |
parent | db41c4f4b5f27757838ba17c03f6f263b91af527 (diff) | |
download | nextcloud-server-38a2467a4f6344affc17a4c21862b047bfdf51e1.tar.gz nextcloud-server-38a2467a4f6344affc17a4c21862b047bfdf51e1.zip |
test for statcache after fopen
-rw-r--r-- | tests/lib/files/storage/storage.php | 13 |
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']); + } } |