You are here

public function vfsStreamWrapperFileTestCase::file_put_contentsNonExistingFile in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php \org\bovigo\vfs\vfsStreamWrapperFileTestCase::file_put_contentsNonExistingFile()

assert that file_put_contents() delivers correct file contents

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperFileTestCase.php, line 92

Class

vfsStreamWrapperFileTestCase
Test for org\bovigo\vfs\vfsStreamWrapper.

Namespace

org\bovigo\vfs

Code

public function file_put_contentsNonExistingFile() {
  $this
    ->assertEquals(14, file_put_contents($this->fooURL . '/baznot.bar', 'baz is not bar'));
  $this
    ->assertEquals(3, count($this->foo
    ->getChildren()));
  $this
    ->assertEquals(14, file_put_contents($this->barURL . '/baznot.bar', 'baz is not bar'));
  $this
    ->assertEquals(2, count($this->bar
    ->getChildren()));
}