You are here

public function UnlinkTestCase::canNotRemoveWritableFileFromNonWritableDirectory in Zircon Profile 8

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

@test @group issue_51

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/UnlinkTestCase.php, line 35

Class

UnlinkTestCase
Test for unlink() functionality.

Namespace

org\bovigo\vfs

Code

public function canNotRemoveWritableFileFromNonWritableDirectory() {
  $structure = array(
    'test_directory' => array(
      'test.file' => '',
    ),
  );
  $root = vfsStream::setup('root', null, $structure);
  $root
    ->getChild('test_directory')
    ->chmod(0444);
  $root
    ->getChild('test_directory')
    ->getChild('test.file')
    ->chmod(0777);
  $this
    ->assertFalse(@unlink(vfsStream::url('root/test_directory/test.file')));
}