/** * Create package directory * * @param integer $id Package ID * @return string Path to created directory */ public function createDirectory($id) { $dir = $this->getPath($id); \Library\FileObject::mkdir($dir); return $dir; }
public function testMkdirErrorDirectoryExists() { $pathname = vfsStream::newDirectory('test')->at($this->_root)->url(); $this->setExpectedException('RuntimeException', "Error creating directory '{$pathname}': path exists"); FileObject::mkdir($pathname); }