diff options
Diffstat (limited to 'tests/lib/files')
-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']); + } } |