public function testNewlyAdded() { $app = $this->getApp(); $options = $app['extend.manager']->getOptions(); $boltJson = new BoltExtendJson($options); $json = $boltJson->updateJson($app); $json['require']['gawain/clippy'] = '~2.0'; $boltJson->execute($options['composerjson'], $json); $action = new CheckPackage($app); $result = $action->execute(); $this->assertEquals('gawain/clippy', $result['installs'][0]['name']); }
public function testExecute() { $action = new BoltExtendJson($this->options); $action->execute($this->options['composerjson'], array('extra' => array('bolt-test' => true))); }
/** * Check for local extension composer.json files and import their PSR-4 settings. * * @param boolean $force * * @internal */ public function checkLocalAutoloader($force = false) { if (!$this->app['filesystem']->has('extensions://local/')) { return; } if (!$force && $this->app['filesystem']->has('app://cache/.local.autoload.built')) { return; } if (!$this->app['filesystem']->has('extensions://composer.json')) { $initjson = new BoltExtendJson($this->app['extend.manager']->getOptions()); $this->json = $initjson->updateJson($this->app); } $finder = new Finder(); $finder->files()->in($this->basefolder . '/local')->followLinks()->name('composer.json')->depth('== 2'); if ($finder->count() > 0) { $this->setLocalExtensionPsr4($finder); } }
/** * Set up Composer JSON file. */ private function updateJson() { $initjson = new BoltExtendJson($this->options); $this->json = $initjson->updateJson($this->app); }