/** * Class constructor. Will register both, the stream default options and wrapper handler. * * Note: Each FileSystem instance will create NEW stream wrapper/scheme. */ public function __construct() { $this->scheme = uniqid('phpvfs'); /* injecting components */ $this->container = $container = new Container(new Factory()); $this->container->root()->setScheme($this->scheme); $this->registerContextOptions($container); stream_wrapper_register($this->scheme, sprintf('\\%s\\%s', __NAMESPACE__, 'Wrapper')); }
public function testRemoveThrowsWhenDeletingDirectoriesWithRecursiveFlag() { $container = new Container(new Factory()); $container->createDir('/dir'); $this->setExpectedException('\\RuntimeException', 'Won\'t non-recursively remove directory'); $container->remove('/dir'); }