Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/PEAR_Command_Install/install/test_bug5513.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ segfaults with the simplest of files. Generation still works great in PHP4
</r>', 'text/xml');
$pearweb->addRESTConfig("http://pear.php.net/rest/r/phpdocumentor/deps.1.3.0RC3.txt", 'a:3:{i:1;a:4:{s:4:"type";s:3:"php";s:3:"rel";s:2:"ge";s:7:"version";s:5:"4.1.0";s:8:"optional";s:2:"no";}i:2;a:5:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:3:"1.1";s:8:"optional";s:2:"no";s:4:"name";s:11:"Archive_Tar";}i:3;a:5:{s:4:"type";s:3:"pkg";s:3:"rel";s:2:"ge";s:7:"version";s:3:"1.1";s:8:"optional";s:3:"yes";s:4:"name";s:14:"XML_Beautifier";}}', 'text/xml');
$pearweb->addRESTConfig("http://pear.php.net/rest/r/xdebug/allreleases.xml", false, false);
$pearweb->addRESTConfig("http://pecl.php.net/rest/r/xdebug/allreleases.xml", '<?xml version="1.0" encoding="iso-8859-1" ?>
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/xdebug/allreleases.xml", '<?xml version="1.0" encoding="iso-8859-1" ?>
<a xmlns="http://pear.php.net/dtd/rest.allreleases"
xsi:schemaLocation="http://pear.php.net/dtd/rest.allreleases
http://pear.php.net/dtd/rest.allreleases.xsd">
Expand All @@ -352,7 +352,7 @@ $pearweb->addRESTConfig("http://pecl.php.net/rest/r/xdebug/allreleases.xml", '<?
<r><v>1.3.0rc1</v><s>beta</s></r>
<r><v>1.2.0</v><s>stable</s></r>
</a>', 'text/xml');
$pearweb->addRESTConfig("http://pecl.php.net/rest/r/xdebug/2.0.0beta4.xml", '<?xml version="1.0" encoding="iso-8859-1" ?>
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/xdebug/2.0.0beta4.xml", '<?xml version="1.0" encoding="iso-8859-1" ?>
<r xmlns="http://pear.php.net/dtd/rest.release"
xsi:schemaLocation="http://pear.php.net/dtd/rest.release
http://pear.php.net/dtd/rest.release.xsd">
Expand Down Expand Up @@ -402,10 +402,10 @@ Xdebug also provides:
- Fixed bug #133: PHP scripts exits with 0 on PHP error.
- Fixed bug #132: use of eval causes a segmentation fault.</n>
<f>228343</f>
<g>http://pecl.php.net/get/xdebug-2.0.0beta4</g>
<g>https://pecl.php.net/get/xdebug-2.0.0beta4</g>
<x xlink:href="package.2.0.0beta4.xml"/>
</r>', 'text/xml');
$pearweb->addRESTConfig("http://pecl.php.net/rest/r/xdebug/2.0.0beta4.xml", '<?xml version="1.0" encoding="iso-8859-1" ?>
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/xdebug/2.0.0beta4.xml", '<?xml version="1.0" encoding="iso-8859-1" ?>
<r xmlns="http://pear.php.net/dtd/rest.release"
xsi:schemaLocation="http://pear.php.net/dtd/rest.release
http://pear.php.net/dtd/rest.release.xsd">
Expand Down Expand Up @@ -455,10 +455,10 @@ Xdebug also provides:
- Fixed bug #133: PHP scripts exits with 0 on PHP error.
- Fixed bug #132: use of eval causes a segmentation fault.</n>
<f>228343</f>
<g>http://pecl.php.net/get/xdebug-2.0.0beta4</g>
<g>https://pecl.php.net/get/xdebug-2.0.0beta4</g>
<x xlink:href="package.2.0.0beta4.xml"/>
</r>', 'text/xml');
$pearweb->addRESTConfig("http://pecl.php.net/rest/r/xdebug/deps.2.0.0beta4.txt", 'a:1:{s:8:"required";a:2:{s:3:"php";a:1:{s:3:"min";s:5:"4.3.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:7:"1.4.0b1";}}}', 'text/xml');
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/xdebug/deps.2.0.0beta4.txt", 'a:1:{s:8:"required";a:2:{s:3:"php";a:1:{s:3:"min";s:5:"4.3.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:7:"1.4.0b1";}}}', 'text/xml');
$pearweb->addRESTConfig("http://pear.php.net/rest/r/archive_tar/allreleases.xml", '<?xml version="1.0" encoding="UTF-8" ?>
<a xmlns="http://pear.php.net/dtd/rest.allreleases"
xsi:schemaLocation="http://pear.php.net/dtd/rest.allreleases
Expand Down Expand Up @@ -678,7 +678,7 @@ $ pear install PhpDocumentor
http://localhost/pear/PhpDocumentor is the web interface</d>
<r xlink:href="/rest/r/phpdocumentor"/>
</p>', 'text/xml');
$pearweb->addRESTConfig("http://pecl.php.net/rest/p/xdebug/info.xml", '<?xml version="1.0" encoding="UTF-8" ?>
$pearweb->addRESTConfig("https://pecl.php.net/rest/p/xdebug/info.xml", '<?xml version="1.0" encoding="UTF-8" ?>
<p xmlns="http://pear.php.net/dtd/rest.package" xsi:schemaLocation="http://pear.php.net/dtd/rest.package http://pear.php.net/dtd/rest.package.xsd">
<n>Xdebug</n>
<c>pecl.php.net</c>
Expand Down Expand Up @@ -747,7 +747,7 @@ The new PEAR_PackageFileManager2 class is not.</d>
</p>', 'text/xml');
$pearweb->addRESTConfig("http://pear.php.net/rest/r/pear_packagefilemanager/deps.1.6.0a3.txt", 'a:1:{s:8:"required";a:2:{s:3:"php";a:1:{s:3:"min";s:5:"4.2.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:7:"1.4.0b1";}}}', 'text/xml');
$pearweb->addRESTConfig("http://pear.php.net/rest/r/phing/allreleases.xml", false, false);
$pearweb->addRESTConfig("http://pecl.php.net/rest/r/phing/allreleases.xml", false, false);
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/phing/allreleases.xml", false, false);
$pathtopackagexml = dirname(__FILE__) . DIRECTORY_SEPARATOR .
'packages'. DIRECTORY_SEPARATOR . 'phing-current.tgz';
$pathtobarxml = dirname(__FILE__) . DIRECTORY_SEPARATOR .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $reg->updateChannel($chan);

$GLOBALS['pearweb']->addHtmlConfig('http://www.example.com/test-1.0.tgz', $pathtopackagexml);

$pearweb->addRESTConfig("http://pecl.php.net/rest/r/test/allreleases.xml", false, false);
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/test/allreleases.xml", false, false);
$pearweb->addRESTConfig("http://pear.php.net/rest/r/test/allreleases.xml", false, false);

$dp = newDownloaderPackage(array());
Expand All @@ -45,7 +45,7 @@ $phpunit->assertErrors(array(
),
array(
'package' => 'PEAR_Error',
'message' => 'File http://pecl.php.net:80/rest/r/test/allreleases.xml not valid (received: HTTP/1.1 404 http://pecl.php.net/rest/r/test/allreleases.xml Is not valid)',
'message' => 'File https://pecl.php.net:443/rest/r/test/allreleases.xml not valid (received: HTTP/1.1 404 https://pecl.php.net/rest/r/test/allreleases.xml Is not valid)',
),
), 'after initialize');

Expand Down
12 changes: 6 additions & 6 deletions tests/PEAR_Installer/test_bug14702.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ if (!getenv('PHP_PEAR_RUNTESTS')) {
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';

$pathtopackagexml = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bug14702'. DIRECTORY_SEPARATOR . 'pecl_http-1.6.0.tgz';
$GLOBALS['pearweb']->addHtmlConfig('http://pecl.php.net/get/pecl_http-1.6.0.tgz', $pathtopackagexml);
$GLOBALS['pearweb']->addHtmlConfig('https://pecl.php.net/get/pecl_http-1.6.0.tgz', $pathtopackagexml);

$pearweb->addRESTConfig("http://pecl.php.net/rest/r/pecl_http/allreleases.xml", '<?xml version="1.0" encoding="UTF-8" ?>
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/pecl_http/allreleases.xml", '<?xml version="1.0" encoding="UTF-8" ?>
<a xmlns="http://pear.php.net/dtd/rest.allreleases"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://pear.php.net/dtd/rest.allreleases
http://pear.php.net/dtd/rest.allreleases.xsd">
Expand Down Expand Up @@ -90,7 +90,7 @@ $pearweb->addRESTConfig("http://pecl.php.net/rest/r/pecl_http/allreleases.xml",
</a>', 'text/xml');


$pearweb->addRESTConfig("http://pecl.php.net/rest/p/pecl_http/info.xml", '<?xml version="1.0" encoding="UTF-8" ?>
$pearweb->addRESTConfig("https://pecl.php.net/rest/p/pecl_http/info.xml", '<?xml version="1.0" encoding="UTF-8" ?>
<p xmlns="http://pear.php.net/dtd/rest.package" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://pear.php.net/dtd/rest.package http://pear.php.net/dtd/rest.package.xsd">
<n>pecl_http</n>
Expand All @@ -111,7 +111,7 @@ support. Parallel requests are available for PHP 5 and greater.</d>
<r xlink:href="/rest/r/pecl_http"/>
</p>', 'text/xml');

$pearweb->addRESTConfig("http://pecl.php.net/rest/r/pecl_http/1.6.0.xml", '<?xml version="1.0" encoding="UTF-8" ?>
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/pecl_http/1.6.0.xml", '<?xml version="1.0" encoding="UTF-8" ?>
<r xmlns="http://pear.php.net/dtd/rest.release"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
Expand Down Expand Up @@ -150,11 +150,11 @@ support. Parallel requests are available for PHP 5 and greater.</d>
* Fixed missing PHP_LIBDIR definition in config.m4 for PHP4
* Fixed non-standard shell support in config.m4</n>
<f>172432</f>
<g>http://pecl.php.net/get/pecl_http-1.6.0</g>
<g>https://pecl.php.net/get/pecl_http-1.6.0</g>
<x xlink:href="package.1.6.0.xml"/>
</r>', 'text/xml');

$pearweb->addRESTConfig("http://pecl.php.net/rest/r/pecl_http/deps.1.6.0.txt", 'a:2:{s:8:"required";a:2:{s:3:"php";a:3:{s:3:"min";s:3:"4.3";s:3:"max";s:5:"6.0.0";s:7:"exclude";s:5:"6.0.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:5:"1.4.1";}}s:8:"optional";a:1:{s:9:"extension";a:4:{i:0;a:1:{s:4:"name";s:3:"spl";}i:1;a:1:{s:4:"name";s:7:"session";}i:2;a:1:{s:4:"name";s:4:"hash";}i:3;a:1:{s:4:"name";s:5:"iconv";}}}}', 'text/xml');
$pearweb->addRESTConfig("https://pecl.php.net/rest/r/pecl_http/deps.1.6.0.txt", 'a:2:{s:8:"required";a:2:{s:3:"php";a:3:{s:3:"min";s:3:"4.3";s:3:"max";s:5:"6.0.0";s:7:"exclude";s:5:"6.0.0";}s:13:"pearinstaller";a:1:{s:3:"min";s:5:"1.4.1";}}s:8:"optional";a:1:{s:9:"extension";a:4:{i:0;a:1:{s:4:"name";s:3:"spl";}i:1;a:1:{s:4:"name";s:7:"session";}i:2;a:1:{s:4:"name";s:4:"hash";}i:3;a:1:{s:4:"name";s:5:"iconv";}}}}', 'text/xml');


$_test_dep->setPEARVersion('1.6.1');
Expand Down
3 changes: 2 additions & 1 deletion tests/download_test_classes.php.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class test_PEAR_REST extends PEAR_REST {
$host = @$info['host'];
$port = @$info['port'];
$path = @$info['path'];
$scheme = @$info['scheme'];
}
$proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
if ($this->config->get('http_proxy')&&
Expand Down Expand Up @@ -81,7 +82,7 @@ class test_PEAR_REST extends PEAR_REST {
return false;
}
if ($matches[1] != 200) {
return PEAR::raiseError("File http://$host:$port$path not valid (received: $line)");
return PEAR::raiseError("File $scheme://$host:$port$path not valid (received: $line)");
}
}
$line = array_shift($retrieved);
Expand Down
Loading