public function vfsStreamTestCase::newFileWithDifferentPermissions in Zircon Profile 8.0
Same name and namespace in other branches
- 8 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\vfsCode
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());
}