Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Gunnar Wrobel (wrobel@pardus.de)
Beispiel #1
0
 /**
  * Retrieve the dependencies for the specified package release.
  *
  * @param string $package  The package name.
  * @param string $version  The package version.
  *
  * @return array The package dependencies.
  */
 public function getDependencies($package, $version)
 {
     $deps = new Horde_Pear_Rest_Dependencies($this->_rest->fetchPackageDependencies($package, $version));
     return $deps->getDependencies();
 }
Beispiel #2
0
 public function testDependencyList()
 {
     $deps = new Horde_Pear_Rest_Dependencies('a:1:{s:8:"optional";a:1:{s:7:"package";a:2:{i:0;a:1:{s:4:"name";s:5:"test2";}i:1;a:1:{s:4:"name";s:5:"test1";}}}}');
     $this->assertEquals(array(array('name' => 'test2', 'type' => 'pkg', 'optional' => 'yes'), array('name' => 'test1', 'type' => 'pkg', 'optional' => 'yes')), $deps->getDependencies());
 }