You are here

public function UnlinkTestCase::canRemoveNonWritableFileFromWritableDirectory 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::canRemoveNonWritableFileFromWritableDirectory()

@test @group issue_51

File

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

Class

UnlinkTestCase
Test for unlink() functionality.

Namespace

org\bovigo\vfs

Code

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