You are here

public function vfsStreamWrapperMkDirTestCase::unlinkCanNotRemoveNonEmptyDirectory in Zircon Profile 8.0

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

@test @since 0.11.0 @group issue_23

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperDirTestCase.php, line 435

Class

vfsStreamWrapperMkDirTestCase
Test for org\bovigo\vfs\vfsStreamWrapper around mkdir().

Namespace

org\bovigo\vfs

Code

public function unlinkCanNotRemoveNonEmptyDirectory() {
  try {
    $this
      ->assertFalse(unlink($this->barURL));
  } catch (\PHPUnit_Framework_Error $fe) {
    $this
      ->assertEquals('unlink(vfs://foo/bar): Operation not permitted', $fe
      ->getMessage());
  }
  $this
    ->assertTrue($this->foo
    ->hasChild('bar'));
  $this
    ->assertFileExists($this->barURL);
}