예제 #1
0
 /**
  * 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'));
 }
예제 #2
0
 public function testRemoveThrowsWhenDeletingDirectoriesWithRecursiveFlag()
 {
     $container = new Container(new Factory());
     $container->createDir('/dir');
     $this->setExpectedException('\\RuntimeException', 'Won\'t non-recursively remove directory');
     $container->remove('/dir');
 }