public function testFileMissingChangeBase() { FileExists::setBasePath('src'); $fe = new FileExists('_i_don_t_exist'); $this->assertFalse($fe()); FileExists::resetBasePath(); }
protected function updateDependencies() { $this->info('Updating dependencies and running asset pipelines...'); FileExists::setBasePath(function_exists('base_path') ? base_path() : getcwd()); $commands = [['npm install', new FileExists('package.json')], ['bower install', new FileExists('bower.json')], ['gulp --production', new FileExists('gulpfile.js')]]; foreach ($commands as $command) { list($cmd, $condition) = $command; $this->conditionalProcess($cmd, $condition, 0); } }