예제 #1
0
파일: ModFile.php 프로젝트: Jako/pdoTools
 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;
 }
예제 #2
0
파일: TestCase.php 프로젝트: zhabinka/fenom
 public static function setUpBeforeClass()
 {
     if (!file_exists(FENOM_RESOURCES . '/template')) {
         mkdir(FENOM_RESOURCES . '/template', 0777, true);
     } else {
         FS::clean(FENOM_RESOURCES . '/template/');
     }
 }
예제 #3
0
 /**
  * Remove all compiled templates
  */
 public function clearAllCompiles()
 {
     \Fenom\Provider::clean($this->_compile_dir);
     $this->flush();
 }
예제 #4
0
 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'));
 }