コード例 #1
0
ファイル: PackageManager.php プロジェクト: aleksabp/bolt
 /**
  * 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);
 }
コード例 #2
0
ファイル: CheckPackageTest.php プロジェクト: aaleksu/bolt_cm
 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']);
 }
コード例 #3
0
 public function testExecute()
 {
     $action = new BoltExtendJson($this->options);
     $action->execute($this->options['composerjson'], array('extra' => array('bolt-test' => true)));
 }