/** * Require (install) packages. * * @param $packages array Associative array of package names/versions to remove * Format: array('name' => '', 'version' => '') * * @return integer 0 on success or a positive error code on failure */ public function requirePackage(array $packages) { if (!$this->require) { $this->require = new RequirePackage($this->app); } // 0 on success or a positive error code on failure return $this->require->execute($packages); }
public function testUpdateCheck() { $app = $this->getApp(); $action = new RequirePackage($app); $action->execute(array('name' => 'gawain/clippy', 'version' => '~2.0')); $action = new CheckPackage($app); $result = $action->execute(); $this->assertTrue(is_array($result['updates'])); }