summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2004-06-06 16:05:30 +0000
committerGreg Beaver <cellog@php.net>2004-06-06 16:05:30 +0000
commitb4ae74ae2c8a2d4280358400469562bf2cac2a76 (patch)
tree1334baabff4096010b044a1c1cfb2e2ea51e1f1a /pear
parent9304645cf3b157d18393f25657230f8f802907c3 (diff)
downloadphp-git-b4ae74ae2c8a2d4280358400469562bf2cac2a76.tar.gz
update unit tests for PEAR 1.4.0dev6, using new getDownloadURL() xml-rpc call
Diffstat (limited to 'pear')
-rw-r--r--pear/tests/PEAR_test_mock_pearweb.php.inc39
-rw-r--r--pear/tests/download_test.config.inc1239
-rw-r--r--pear/tests/package-PEARtests.xml6
-rw-r--r--pear/tests/pear_downloader_invalid.phpt15
4 files changed, 1288 insertions, 11 deletions
diff --git a/pear/tests/PEAR_test_mock_pearweb.php.inc b/pear/tests/PEAR_test_mock_pearweb.php.inc
index baff2cbe48..f1f7edc9c1 100644
--- a/pear/tests/PEAR_test_mock_pearweb.php.inc
+++ b/pear/tests/PEAR_test_mock_pearweb.php.inc
@@ -58,6 +58,43 @@ class PEAR_test_mock_pearweb {
function call($method, $params)
{
if (!isset($this->_config['xmlrpc'][$method])) {
+ include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'php_dump.php.inc';
+ $args = $params;
+ switch (count($args)) {
+ case 0:
+ $result = $this->_remote->parentcall($method);
+ break;
+ case 1:
+ $result = $this->_remote->parentcall($method, $args[0]);
+ break;
+ case 2:
+ $result = $this->_remote->parentcall($method, $args[0], $args[1]);
+ break;
+ case 3:
+ $result = $this->_remote->parentcall($method, $args[0], $args[1], $args[2]);
+ break;
+ case 4:
+ $result = $this->_remote->parentcall($method, $args[0], $args[1], $args[2], $args[3]);
+ break;
+ case 5:
+ $result = $this->_remote->parentcall($method, $args[0], $args[1], $args[2], $args[3], $args[4]);
+ break;
+ case 6:
+ $result = $this->_remote->parentcall($method, $args[0], $args[1], $args[2], $args[3], $args[4], $args[5]);
+ break;
+ }
+ $dump = new PHP_Dump($result);
+ $args = new PHP_Dump($args);
+ if (!isset($this->_pearweb->_config['xmlrpc'][$method][serialize($args)]))
+ $GLOBALS['totalPHP'][$method . serialize($args)] = '$pearweb->addXmlrpcConfig("' .
+ $method . '", ' .
+ $args->toPHP() . ', ' .
+ $dump->toPHP() .");";
+ foreach($GLOBALS['totalPHP'] as $php) {
+ echo $php . "\n";
+ }
+ var_dump(array_keys($this->_config['xmlrpc'][$method]), $params);
+ die("Error - parameters not configured properly for $method");
return false;
}
if (!isset($this->_config['xmlrpc'][$method][serialize($params)])) {
@@ -74,7 +111,7 @@ class PEAR_test_mock_pearweb {
$result = $this->_remote->parentcall($method, $args[0], $args[1]);
break;
case 3:
- $result = $this->_remote->parentcall_epi($method, $args[0], $args[1], $args[2]);
+ $result = $this->_remote->parentcall($method, $args[0], $args[1], $args[2]);
break;
case 4:
$result = $this->_remote->parentcall($method, $args[0], $args[1], $args[2], $args[3]);
diff --git a/pear/tests/download_test.config.inc b/pear/tests/download_test.config.inc
index b330e0ad1a..71dd32133d 100644
--- a/pear/tests/download_test.config.inc
+++ b/pear/tests/download_test.config.inc
@@ -870,6 +870,1207 @@ $pearweb->addXmlrpcConfig("package.info", array(
array(
),
));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "noreleases",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), false);
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg1",
+ 2 =>
+ "1976.9.2",
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "8",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:29:15",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg1",
+ 2 =>
+ "snapshot",
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "8",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:29:15",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg1",
+ 2 =>
+ "burgerking",
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "8",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:29:15",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "stabilitytoolow",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "3.0dev",
+ 1 =>
+ array(
+ 'id' =>
+ "23",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-06 00:27:38",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "devel",
+ ),
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "stabilitytoolow",
+ 2 =>
+ "3.0dev",
+ ), array(
+ 0 =>
+ "3.0dev",
+ 1 =>
+ array(
+ 'id' =>
+ "23",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-06 00:27:38",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "devel",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/stabilitytoolow-3.0dev",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "stabilitytoolow",
+ 2 =>
+ array(
+ 0 =>
+ "beta",
+ 1 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "21",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-06 00:26:42",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/stabilitytoolow-1.0b1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "stabilitytoolow",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "2.0a1",
+ 1 =>
+ array(
+ 'id' =>
+ "22",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-06 00:27:19",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "alpha",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/stabilitytoolow-2.0a1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "stabilitytoolow",
+ 2 =>
+ array(
+ 0 =>
+ "devel",
+ 1 =>
+ "alpha",
+ 2 =>
+ "beta",
+ 3 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "3.0dev",
+ 1 =>
+ array(
+ 'id' =>
+ "23",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-06 00:27:38",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "devel",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/stabilitytoolow-3.0dev",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg6",
+ 2 =>
+ array(
+ 0 =>
+ "devel",
+ 1 =>
+ "alpha",
+ 2 =>
+ "beta",
+ 3 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "9",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:34:03",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg6-2.0b1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg6",
+ 2 =>
+ "1.1",
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "7",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:37",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg6-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "depnoreleases",
+ 2 =>
+ array(
+ 0 =>
+ "devel",
+ 1 =>
+ "alpha",
+ 2 =>
+ "beta",
+ 3 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.0",
+ 1 =>
+ array(
+ 'id' =>
+ "24",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-06 17:10:42",
+ 'releasenotes' =>
+ "dependency has no releases test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/depnoreleases-1.0",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "depunstable",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.0",
+ 1 =>
+ array(
+ 'id' =>
+ "26",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-06 17:32:38",
+ 'releasenotes' =>
+ "dependency stability is too low",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/depunstable-1.0",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg6",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "7",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:37",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg6-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg6",
+ 2 =>
+ "stable",
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "7",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:37",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg6-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg6",
+ 2 =>
+ "beta",
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "9",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:34:03",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg6-2.0b1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg6",
+ 2 =>
+ array(
+ 0 =>
+ "beta",
+ 1 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "9",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:34:03",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg6-2.0b1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg2",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "3",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:02:56",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg2-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg3",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "4",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:06",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg3-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg4",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "5",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:17",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg4-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg5",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "6",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:25",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg5-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg1",
+ 2 =>
+ array(
+ 0 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "2",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:02:43",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg1-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg1",
+ 2 =>
+ array(
+ 0 =>
+ "beta",
+ 1 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "8",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:29:15",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg1-2.0b1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg2",
+ 2 =>
+ array(
+ 0 =>
+ "beta",
+ 1 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "3",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:02:56",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg2-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg3",
+ 2 =>
+ array(
+ 0 =>
+ "beta",
+ 1 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "4",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:06",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg3-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg4",
+ 2 =>
+ array(
+ 0 =>
+ "beta",
+ 1 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "5",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:17",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg4-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg5",
+ 2 =>
+ array(
+ 0 =>
+ "beta",
+ 1 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "6",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:25",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg5-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg1",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "8",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:29:15",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg1-2.0b1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg2",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "3",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:02:56",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg2-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg3",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.4",
+ 1 =>
+ array(
+ 'id' =>
+ "11",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:51:31",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "alpha",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg3-1.4",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg4AndAHalf",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.3",
+ 1 =>
+ array(
+ 'id' =>
+ "10",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:50:05",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg4AndAHalf-1.3",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg4",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "5",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:17",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg4-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg5",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "1.1",
+ 1 =>
+ array(
+ 'id' =>
+ "6",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 17:03:25",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "stable",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg5-1.1",
+ ));
+$pearweb->addXmlrpcConfig("package.getDownloadURL", array(
+ 0 =>
+ "pear",
+ 1 =>
+ "pkg6",
+ 2 =>
+ array(
+ 0 =>
+ "alpha",
+ 1 =>
+ "beta",
+ 2 =>
+ "stable",
+ ),
+ ), array(
+ 0 =>
+ "2.0b1",
+ 1 =>
+ array(
+ 'id' =>
+ "9",
+ 'doneby' =>
+ "cellog",
+ 'license' =>
+ "",
+ 'summary' =>
+ "",
+ 'description' =>
+ "",
+ 'releasedate' =>
+ "2003-12-03 18:34:03",
+ 'releasenotes' =>
+ "required dependency test",
+ 'state' =>
+ "beta",
+ ),
+ 2 =>
+ "http://pear.Chiara/get/pkg6-2.0b1",
+ ));
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg6-1.1.tgz",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'pkg6-1.1.tgz');
@@ -877,44 +2078,82 @@ $pearweb->addHtmlConfig("http://pear.Chiara/get/pkg6-1.1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'pkg6-1.1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg6-2.0b1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'pkg6-2.0b1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg6-2.0b1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'pkg6-2.0b1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg2-1.1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg2-1.1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg2-1.1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg2-1.1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg3-1.1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg3-1.1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg3-1.1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg3-1.1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg4-1.1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg4-1.1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg4-1.1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg4-1.1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg5-1.1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg5-1.1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg5-1.1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg5-1.1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg1-1.1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg1-1.1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg1-1.1.tgz",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg1-1.1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg1-2.0b1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg1-2.0b1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg1-2.0b1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg1-2.0b1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg3-1.4",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg3-1.4.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg3-1.4.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg3-1.4.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg4AndAHalf-1.3",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg4AndAHalf-1.3.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/pkg4AndAHalf-1.3.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pkg4AndAHalf-1.3.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-0.3",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-0.3.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-0.3.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-0.3.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-0.5",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-0.5.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-0.5.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-0.5.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-0.6beta",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-0.6beta.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-0.6beta.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-0.6beta.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-1.0b1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-1.0b1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-1.0b1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-1.0b1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-2.0a1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-2.0a1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-2.0a1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-2.0a1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-2.0b1",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-2.0b1.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-2.0b1.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-2.0b1.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-2.0dev",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-2.0dev.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-2.0dev.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-2.0dev.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-3.0dev",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-3.0dev.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-3.0dev.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-3.0dev.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/depnoreleases-1.0",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'depnoreleases-1.0.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/depnoreleases-1.0.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'depnoreleases-1.0.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/depunstable-1.0",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'depunstable-1.0.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/depunstable-1.0.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'depunstable-1.0.tgz');
$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow",
dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-3.0dev.tgz');
+$pearweb->addHtmlConfig("http://pear.Chiara/get/stabilitytoolow-3.0dev.tgz",
+ dirname(__FILE__) . DIRECTORY_SEPARATOR . 'stabilitytoolow-3.0dev.tgz');
?> \ No newline at end of file
diff --git a/pear/tests/package-PEARtests.xml b/pear/tests/package-PEARtests.xml
index 2cf1b8bddf..daceee967b 100644
--- a/pear/tests/package-PEARtests.xml
+++ b/pear/tests/package-PEARtests.xml
@@ -13,13 +13,13 @@
</maintainer>
</maintainers>
<release>
- <version>2.0</version>
- <date>2004-06-01</date>
+ <version>2.1</version>
+ <date>2004-06-04</date>
<license>PHP License</license>
<state>stable</state>
<notes>Installation package.xml for PEAR package tests</notes>
<deps>
- <dep type="pkg" rel="ge" version="1.4.0dev5">PEAR</dep>
+ <dep type="pkg" rel="ge" version="1.4.0dev6">PEAR</dep>
<dep type="pkg" rel="ge" version="1.1">Archive_Tar</dep>
<dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep>
<dep type="pkg" rel="ge" version="1.1.0">XML_RPC</dep>
diff --git a/pear/tests/pear_downloader_invalid.phpt b/pear/tests/pear_downloader_invalid.phpt
index c6a3b3cec6..fb14a69db3 100644
--- a/pear/tests/pear_downloader_invalid.phpt
+++ b/pear/tests/pear_downloader_invalid.phpt
@@ -151,6 +151,7 @@ $installpackages = $installer->getDownloadedPackages();
var_dump(get_class($a), $installer->getErrorMsgs(), $installpackages[0]['info']['version']);
$installer->configSet('preferred_state', 'beta');
+$installer->setOptions(array());
echo "Test automatic version resolution (beta):\n";
$packages = array("stabilitytoolow");
@@ -180,8 +181,8 @@ $forinstall = &new PEAR_Installer($ui);
$forinstall->setOptions(array());
$installer->setOptions(array());
-$forinstall->doDownload(array('pkg6'));
-$pkgs = $forinstall->getDownloadedPackages();
+$installer->doDownload(array('pkg6'));
+$pkgs = $installer->getDownloadedPackages();
$forinstall->install($pkgs[0]['file']);
$installer->doDownload(array('pkg6'));
var_dump(get_class($a), $installer->getErrorMsgs());
@@ -284,14 +285,14 @@ array(0) {
array(0) {
}
Test download of a non-existing package version:
-Caught error: No release with version '1976.9.2' found for 'pear::pkg1'
+Caught error: No release of 'pear::pkg1' with version '1976.9.2' found, latest release is version '2.0b1', stability 'beta', use --force to install
string(10) "pear_error"
array(0) {
}
array(0) {
}
Test download of a non-existing package release state:
-Caught error: No release with state 'snapshot' found for 'pear::pkg1'
+Caught error: No release of 'pear::pkg1' with state 'snapshot' found, latest release is version '2.0b1', stability 'beta', use --force to install
string(10) "pear_error"
array(0) {
}
@@ -305,14 +306,14 @@ array(0) {
array(0) {
}
Test automatic version resolution (stable):
-Caught error: pear::stabilitytoolow is state 'devel' which is less stable than state 'stable', use --force to install
+Caught error: No release of 'pear::stabilitytoolow' within preferred_state of 'stable' found, latest release is version '3.0dev', stability 'devel', use --force to install
string(10) "pear_error"
array(0) {
}
array(0) {
}
Test automatic version resolution (stable) with --force:
-Warning: pear::stabilitytoolow is state 'devel' which is less stable than state 'stable'
+Warning: No release of 'pear::stabilitytoolow' within preferred_state of 'stable' found, latest release, version '3.0dev', stability 'devel' will be downloaded
bool(false)
array(0) {
}
@@ -343,7 +344,7 @@ array(0) {
}
string(5) "2.0b1"
Test download attempt if a version is already installed with upgrade, same version:
-Package 'pear::pkg6-2.0b1' already installed, skipping
+Package 'pear::pkg6', version '2.0b1' already installed, skipping
bool(false)
array(0) {
}