You are here

public function vfsStreamWrapperMkDirTestCase::unlinkCanNotRemoveEmptyDirectory 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::unlinkCanNotRemoveEmptyDirectory()

@test @since 0.11.0 @group issue_23

File

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

Class

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

Namespace

org\bovigo\vfs

Code

public function unlinkCanNotRemoveEmptyDirectory() {
  vfsStream::newDirectory('empty')
    ->at($this->foo);
  try {
    $this
      ->assertTrue(unlink($this->fooURL . '/empty'));
  } catch (\PHPUnit_Framework_Error $fe) {
    $this
      ->assertEquals('unlink(vfs://foo/empty): Operation not permitted', $fe
      ->getMessage());
  }
  $this
    ->assertTrue($this->foo
    ->hasChild('empty'));
  $this
    ->assertFileExists($this->fooURL . '/empty');
}