/** * Initialise a new JSON file. * * @param string $file File to initialise * @param array $data Data to be added as JSON paramter/value pairs */ public function initJson($file, array $data = array()) { if (!$this->initJson) { $this->initJson = new BoltExtendJson($this->options); } $this->initJson->execute($file, $data); }
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))); }