public function vfsStreamWrapperFileTestCase::file_put_contentsExistingFile in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php \org\bovigo\vfs\vfsStreamWrapperFileTestCase::file_put_contentsExistingFile()
assert that file_put_contents() delivers correct file contents
@test
File
- vendor/
mikey179/ vfsStream/ src/ test/ php/ org/ bovigo/ vfs/ vfsStreamWrapperFileTestCase.php, line 48
Class
Namespace
org\bovigo\vfsCode
public function file_put_contentsExistingFile() {
$this
->assertEquals(14, file_put_contents($this->baz2URL, 'baz is not bar'));
$this
->assertEquals('baz is not bar', $this->baz2
->getContent());
$this
->assertEquals(6, file_put_contents($this->baz1URL, 'foobar'));
$this
->assertEquals('foobar', $this->baz1
->getContent());
$this
->assertFalse(@file_put_contents($this->barURL, 'This does not work.'));
$this
->assertFalse(@file_put_contents($this->fooURL, 'This does not work, too.'));
}