public function testGenerate() { Console::init(); Config::init(__DIR__ . "/../../../../../.."); Dispatcher::init(); $generator = new Generator(); $generator->generate(['foo' => 'baz']); echo ''; }
/** * Common init sequence */ protected static function init() { // start the timer Timer::start(); // initialize the console to print out any issues Console::init(); // initialize the config for the pluginDir $baseDir = __DIR__ . "/../../../../../"; Config::init($baseDir, false); Dispatcher::init(); }
/** * Common init sequence */ protected static function init() { // start the timer Timer::start(); // initialize the console to print out any issues Console::init(); // initialize the config for the pluginDir $baseDir = __DIR__ . "/../../../../../"; Config::init($baseDir, false); // make sure the source dir is set-up $sourceDir = Config::getOption("sourceDir"); if (!is_dir($sourceDir)) { FileUtil::makeDir($sourceDir); } // make sure the public dir is set-up $publicDir = Config::getOption("publicDir"); if (!is_dir($publicDir)) { FileUtil::makeDir($publicDir); } Dispatcher::init(); }