You are here

public function vfsStreamWrapperTestCase::unlinkRemovesFilesOnly in Zircon Profile 8

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

@test @group issue_23

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperTestCase.php, line 93

Class

vfsStreamWrapperTestCase
Test for org\bovigo\vfs\vfsStreamWrapper.

Namespace

org\bovigo\vfs

Code

public function unlinkRemovesFilesOnly() {
  $this
    ->assertTrue(unlink($this->baz2URL));
  $this
    ->assertFalse(file_exists($this->baz2URL));

  // make sure statcache was cleared
  $this
    ->assertEquals(array(
    $this->bar,
  ), $this->foo
    ->getChildren());
  $this
    ->assertFalse(@unlink($this->fooURL . '/another'));
  $this
    ->assertFalse(@unlink(vfsStream::url('another')));
  $this
    ->assertEquals(array(
    $this->bar,
  ), $this->foo
    ->getChildren());
}