test for statcache after fopen
This commit is contained in:
parent
db41c4f4b5
commit
38a2467a4f
1 changed files with 13 additions and 0 deletions
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue