function __construct(pdoTools $pdoTools) { $dir = !file_exists($pdoTools->config['elementsPath']) ? MODX_CORE_PATH . 'cache/' : $pdoTools->config['elementsPath']; parent::__construct($dir); $this->pdoTools = $pdoTools; $this->modx = $pdoTools->modx; }
public static function setUpBeforeClass() { if (!file_exists(FENOM_RESOURCES . '/template')) { mkdir(FENOM_RESOURCES . '/template', 0777, true); } else { FS::clean(FENOM_RESOURCES . '/template/'); } }
/** * Remove all compiled templates */ public function clearAllCompiles() { \Fenom\Provider::clean($this->_compile_dir); $this->flush(); }
public function testRm() { $this->assertTrue(is_dir(FENOM_RESOURCES . '/template/sub')); Provider::rm(FENOM_RESOURCES . '/template/sub'); $this->assertFalse(is_dir(FENOM_RESOURCES . '/template/sub')); $this->assertTrue(is_file(FENOM_RESOURCES . '/template/template1.tpl')); Provider::rm(FENOM_RESOURCES . '/template/template1.tpl'); $this->assertFalse(is_file(FENOM_RESOURCES . '/template/template1.tpl')); $this->assertTrue(is_file(FENOM_RESOURCES . '/template/template2.tpl')); Provider::clean(FENOM_RESOURCES . '/template/'); $this->assertFalse(is_file(FENOM_RESOURCES . '/template/template2.tpl')); }