bc_getMock('org\\bovigo\\vfs\\vfsStreamWrapper'); stream_wrapper_register(vfsStream::SCHEME, get_class($mock)); } /** * clean up test environment */ public function tearDown(): void { TestvfsStreamWrapper::unregister(); } /** * registering the stream wrapper when another stream wrapper is already * registered for the vfs scheme should throw an exception * * @test */ public function registerOverAnotherStreamWrapper() { $this->expectException(vfsStreamException::class); vfsStreamWrapper::register(); } }