public function addJS($js) { $filename = basename($js); $data = file_get_contents(TigerApp::AppRoot() . "/" . $js); $id = md5($filename); $publicLocation = "cache/{$id}.js"; $publicLocationOnDisk = TigerApp::AppRoot() . "/public/" . $publicLocation; if (!file_exists(dirname($publicLocationOnDisk))) { mkdir(dirname($publicLocationOnDisk), 0777, true); } file_put_contents($publicLocationOnDisk, $data); chmod($publicLocationOnDisk, 0664); $this->_js[] = $publicLocation; return $this; }
public function setUp() { TigerApp::run(); $this->tigerView = new TigerView(); $this->rrmdir(TigerApp::AppRoot() . "/public/cache"); }
public function testParseConfig() { TigerApp::run()->begin()->parseConfig(TigerApp::AppRoot() . "/config/Default.yaml"); }