You are here

class vfsStreamWrapperAlreadyRegisteredTestCase in Zircon Profile 8

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

Test for org\bovigo\vfs\vfsStreamWrapper.

Hierarchy

Expanded class hierarchy of vfsStreamWrapperAlreadyRegisteredTestCase

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamWrapperAlreadyRegisteredTestCase.php, line 31

Namespace

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

  /**
   * set up test environment
   */
  public function setUp() {
    TestvfsStreamWrapper::unregister();
    $mock = $this
      ->getMock('org\\bovigo\\vfs\\vfsStreamWrapper');
    stream_wrapper_register(vfsStream::SCHEME, get_class($mock));
  }

  /**
   * clean up test environment
   */
  public function tearDown() {
    TestvfsStreamWrapper::unregister();
  }

  /**
   * registering the stream wrapper when another stream wrapper is already
   * registered for the vfs scheme should throw an exception
   *
   * @test
   * @expectedException  org\bovigo\vfs\vfsStreamException
   */
  public function registerOverAnotherStreamWrapper() {
    vfsStreamWrapper::register();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
vfsStreamWrapperAlreadyRegisteredTestCase::registerOverAnotherStreamWrapper public function registering the stream wrapper when another stream wrapper is already registered for the vfs scheme should throw an exception
vfsStreamWrapperAlreadyRegisteredTestCase::setUp public function set up test environment
vfsStreamWrapperAlreadyRegisteredTestCase::tearDown public function clean up test environment