You are here

public function vfsStreamTestCase::newFile in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php \org\bovigo\vfs\vfsStreamTestCase::newFile()

test to create a new file

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamTestCase.php, line 111

Class

vfsStreamTestCase
Test for org\bovigo\vfs\vfsStream.

Namespace

org\bovigo\vfs

Code

public function newFile() {
  $file = vfsStream::newFile('filename.txt');
  $this
    ->assertInstanceOf('org\\bovigo\\vfs\\vfsStreamFile', $file);
  $this
    ->assertEquals('filename.txt', $file
    ->getName());
  $this
    ->assertEquals(0666, $file
    ->getPermissions());
}