Пример #1
0
 public function setUp()
 {
     $this->root = vfsStream::setup();
     $this->files = new Filesystem();
     $this->handler = new FileSessionHandler($this->files, $this->root->url(), 1);
     $this->files->createDirectory(__DIR__ . '/stubs');
 }
Пример #2
0
 public function testCreateDirectory()
 {
     $this->files->createDirectory($this->root->url() . '/test');
     $this->assertTrue(is_dir(vfsStream::url('root/test')));
     $this->assertEquals(0755, $this->root->getChild('test')->getPermissions());
     $this->files->createDirectory($this->root->url() . '/test2', ['visibility' => 'private']);
     $this->assertEquals(0700, $this->root->getChild('test2')->getPermissions());
 }