You are here

class vfsStreamWrapperWithoutRootTestCase in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php \org\bovigo\vfs\vfsStreamWrapperWithoutRootTestCase

Test for org\bovigo\vfs\vfsStreamWrapper.

Hierarchy

Expanded class hierarchy of vfsStreamWrapperWithoutRootTestCase

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperWithoutRootTestCase.php, line 14

Namespace

org\bovigo\vfs
View source
class vfsStreamWrapperWithoutRootTestCase extends \PHPUnit_Framework_TestCase {

  /**
   * set up test environment
   */
  public function setUp() {
    vfsStreamWrapper::register();
  }

  /**
   * no root > no directory to open
   *
   * @test
   */
  public function canNotOpenDirectory() {
    $this
      ->assertFalse(@dir(vfsStream::url('foo')));
  }

  /**
   * can not unlink without root
   *
   * @test
   */
  public function canNotUnlink() {
    $this
      ->assertFalse(@unlink(vfsStream::url('foo')));
  }

  /**
   * can not open a file without root
   *
   * @test
   */
  public function canNotOpen() {
    $this
      ->assertFalse(@fopen(vfsStream::url('foo'), 'r'));
  }

  /**
   * can not rename a file without root
   *
   * @test
   */
  public function canNotRename() {
    $this
      ->assertFalse(@rename(vfsStream::url('foo'), vfsStream::url('bar')));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
vfsStreamWrapperWithoutRootTestCase::canNotOpen public function can not open a file without root
vfsStreamWrapperWithoutRootTestCase::canNotOpenDirectory public function no root > no directory to open
vfsStreamWrapperWithoutRootTestCase::canNotRename public function can not rename a file without root
vfsStreamWrapperWithoutRootTestCase::canNotUnlink public function can not unlink without root
vfsStreamWrapperWithoutRootTestCase::setUp public function set up test environment