You are here

public function vfsStreamUmaskTestCase::createFileUsingStreamWithDifferentUmaskSetting in Zircon Profile 8.0

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

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamUmaskTestCase.php, line 113

Class

vfsStreamUmaskTestCase
Test for umask settings.

Namespace

org\bovigo\vfs

Code

public function createFileUsingStreamWithDifferentUmaskSetting() {
  $root = vfsStream::setup();
  vfsStream::umask(022);
  file_put_contents(vfsStream::url('root/newfile.txt'), 'file content');
  $this
    ->assertEquals(0644, $root
    ->getChild('newfile.txt')
    ->getPermissions());
}