/** * Rendu HTML de l'élément * * @return unknown */ public function render() { $path = COPIX_CACHE_PATH . "/graphviz/"; CopixFile::createDir($path); $md5 = md5(stripslashes($this->code)); $this->hash = $md5; $file = $md5 . ".png"; if (!file_exists($path . $file)) { $this->_render($file); } return $file; }
/** * Test de créations des répertoire * */ public function testCreateDir() { // On crée un répertoire unique avec la fonction write $dirName = COPIX_TEMP_PATH . 'test/' . uniqid('rep') . '/'; $this->assertTrue(CopixFile::write($dirName, $this->_bigData)); // On crée un répertoire unique avec la fonction createDir $dirName = COPIX_TEMP_PATH . 'test/' . uniqid('rep') . '/'; CopixFile::createDir($dirName); $this->assertTrue(file_exists($dirName)); }