You are here

public function vfsStreamTestCase::newFileWithDifferentPermissions in Zircon Profile 8

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

test to create a new file with non-default permissions

@test @group permissions

File

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

Class

vfsStreamTestCase
Test for org\bovigo\vfs\vfsStream.

Namespace

org\bovigo\vfs

Code

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