public function vfsStreamFileTestCase::write in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php \org\bovigo\vfs\vfsStreamFileTestCase::write()
test writing data into the file
@test
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamFileTestCase.php, line 183
Class
Namespace
org\bovigo\vfsCode
public function write() {
$this->file
->setContent('foobarbaz');
$this
->assertTrue($this->file
->seek(3, SEEK_SET));
$this
->assertEquals(3, $this->file
->write('foo'));
$this
->assertEquals('foofoobaz', $this->file
->getContent());
$this
->assertEquals(9, $this->file
->size());
$this
->assertEquals(3, $this->file
->write('bar'));
$this
->assertEquals('foofoobar', $this->file
->getContent());
$this
->assertEquals(9, $this->file
->size());
}