cvs: pear-core /tests PEAR_test_mock_pearweb.php.inc /tests/PEAR_Channelfile test_getpath.phpt test_getport.phpt test_getssl.phpt test_setport.phpt
/tests/PEAR_Command_Install/install test_dependsonpecl.phpt /tests/PEAR_Command_Install/install/packages dependsonpecl.xml peclpackage.xml
peclpkg-1.3.0.tgz /tests/PEAR_Command_Package/package/packagefiles test.php /tests/PEAR_Command_Remote/list-all/packages channel.xml
/tests/PEAR_Downloader setup.php.inc test_bug4285.phpt test_download_abstractpackage_rest.phpt /tests/PEAR_Downloader/packages
Chiara_XML_RPC5-0.3.0.tgz package-bug4285.xml /tests/PEAR_Installer test_install_complexlocalpackage2_depinstalled.phpt test_install_multiple2.phpt
test_uninstall_complex_params_invalid1.phpt test_uninstall_complex_params_invalid2.phpt test_uninstall_optionaldep.phpt
test_uninstall_simple_params_invalid.phpt

From: Date: Mon, 23 May 2005 02:06:16 +0000
Subject: cvs: pear-core /tests PEAR_test_mock_pearweb.php.inc /tests/PEAR_Channelfile test_getpath.phpt test_getport.phpt test_getssl.phpt test_setport.phpt
/tests/PEAR_Command_Install/install test_dependsonpecl.phpt /tests/PEAR_Command_Install/install/packages dependsonpecl.xml peclpackage.xml
peclpkg-1.3.0.tgz /tests/PEAR_Command_Package/package/packagefiles test.php /tests/PEAR_Command_Remote/list-all/packages channel.xml
/tests/PEAR_Downloader setup.php.inc test_bug4285.phpt test_download_abstractpackage_rest.phpt /tests/PEAR_Downloader/packages
Chiara_XML_RPC5-0.3.0.tgz package-bug4285.xml /tests/PEAR_Installer test_install_complexlocalpackage2_depinstalled.phpt test_install_multiple2.phpt
test_uninstall_complex_params_invalid1.phpt test_uninstall_complex_params_invalid2.phpt test_uninstall_optionaldep.phpt
test_uninstall_simple_params_invalid.phpt
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32018@lists.php.net to get a copy of this message
cellog Sun May 22 22:06:16 2005 EDT Added files: /pear-core/tests/PEAR_Downloader test_bug4285.phpt test_download_abstractpackage_rest.phpt /pear-core/tests/PEAR_Channelfile test_getpath.phpt test_getport.phpt test_getssl.phpt test_setport.phpt /pear-core/tests/PEAR_Command_Install/install/packages dependsonpecl.xml peclpackage.xml peclpkg-1.3.0.tgz /pear-core/tests/PEAR_Command_Install/install test_dependsonpecl.phpt /pear-core/tests/PEAR_Command_Package/package/packagefiles test.php /pear-core/tests/PEAR_Command_Remote/list-all/packages channel.xml /pear-core/tests/PEAR_Downloader/packages Chiara_XML_RPC5-0.3.0.tgz package-bug4285.xml Modified files: /pear-core/tests/PEAR_Downloader setup.php.inc /pear-core/tests/PEAR_Installer test_install_complexlocalpackage2_depinstalled.phpt test_install_multiple2.phpt test_uninstall_complex_params_invalid1.phpt test_uninstall_complex_params_invalid2.phpt test_uninstall_optionaldep.phpt test_uninstall_simple_params_invalid.phpt /pear-core/tests PEAR_test_mock_pearweb.php.inc Log: update tests to cvs, add a whole slew of new tests

http://cvs.php.net/diff.php/pear-core/tests/PEAR_Downloader/setup.php.inc?r1=1.7&r2=1.8&ty=u Index: pear-core/tests/PEAR_Downloader/setup.php.inc diff -u pear-core/tests/PEAR_Downloader/setup.php.inc:1.7 pear-core/tests/PEAR_Downloader/setup.php.inc:1.8 --- pear-core/tests/PEAR_Downloader/setup.php.inc:1.7 Wed May 11 14:27:01 2005 +++ pear-core/tests/PEAR_Downloader/setup.php.inc Sun May 22 22:06:14 2005 @@ -69,7 +69,7 @@ require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'phpt_test.php.inc'; $phpunit = &new PEAR_PHPTest(true); $fakelog = new fake_log; -$config = &PEAR_Config::singleton($temp_path . '/pear.ini'); +$config = &test_PEAR_Config::singleton($temp_path . '/pear.ini'); $reg = &$config->getRegistry(); $chan = $reg->getChannel('pear.php.net'); $chan->resetFunctions('rest'); http://cvs.php.net/diff.php/pear-core/tests/PEAR_Installer/test_install_complexlocalpackage2_depinstalled.phpt?r1=1.4&r2=1.5&ty=u Index: pear-core/tests/PEAR_Installer/test_install_complexlocalpackage2_depinstalled.phpt diff -u pear-core/tests/PEAR_Installer/test_install_complexlocalpackage2_depinstalled.phpt:1.4 pear-core/tests/PEAR_Installer/test_install_complexlocalpackage2_depinstalled.phpt:1.5 --- pear-core/tests/PEAR_Installer/test_install_complexlocalpackage2_depinstalled.phpt:1.4 Thu Mar 24 22:48:41 2005 +++ pear-core/tests/PEAR_Installer/test_install_complexlocalpackage2_depinstalled.phpt Sun May 22 22:06:15 2005 @@ -388,7 +388,7 @@ 1 => array ( 0 => 3, - 1 => 'Skipping required dependency "pear/Bar" version 1.5.2, already installed as version 1.4.0a1', + 1 => 'pear/PEAR1: Skipping required dependency "pear/Bar" version 1.5.2, already installed as version 1.4.0a1', ), ), $fakelog->getLog(), 'log messages'); $phpunit->assertEquals(array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Installer/test_install_multiple2.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Installer/test_install_multiple2.phpt diff -u pear-core/tests/PEAR_Installer/test_install_multiple2.phpt:1.2 pear-core/tests/PEAR_Installer/test_install_multiple2.phpt:1.3 --- pear-core/tests/PEAR_Installer/test_install_multiple2.phpt:1.2 Sat Feb 19 23:26:19 2005 +++ pear-core/tests/PEAR_Installer/test_install_multiple2.phpt Sun May 22 22:06:15 2005 @@ -80,12 +80,12 @@ 1 => array ( 0 => 2, - 1 => 'Skipping required dependency "pear/Bar", will be installed', + 1 => 'pear/PEAR1: Skipping required dependency "pear/Bar", will be installed', ), 2 => array ( 0 => 2, - 1 => 'Skipping required dependency "smork/Foobar", will be installed', + 1 => 'pear/Bar: Skipping required dependency "smork/Foobar", will be installed', ), ), $fakelog->getLog(), 'log messages'); $phpunit->assertEquals(array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid1.phpt?r1=1.5&r2=1.6&ty=u Index: pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid1.phpt diff -u pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid1.phpt:1.5 pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid1.phpt:1.6 --- pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid1.phpt:1.5 Mon Feb 7 14:22:23 2005 +++ pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid1.phpt Sun May 22 22:06:15 2005 @@ -53,7 +53,7 @@ 0 => array ( 0 => 0, - 1 => 'pear/next (version >= 1.0) is required by installed package "pear/foo"', + 1 => 'pear/foo (version >= 1.0) is required by installed package "pear/next"', ), ), $fakelog->getLog(), 'foo'); echo 'tests done'; http://cvs.php.net/diff.php/pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid2.phpt?r1=1.5&r2=1.6&ty=u Index: pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid2.phpt diff -u pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid2.phpt:1.5 pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid2.phpt:1.6 --- pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid2.phpt:1.5 Mon Feb 7 14:22:51 2005 +++ pear-core/tests/PEAR_Installer/test_uninstall_complex_params_invalid2.phpt Sun May 22 22:06:15 2005 @@ -54,7 +54,7 @@ 0 => array ( 0 => 0, - 1 => 'pear/next (version >= 1.0) is required by installed package "pear/foo"', + 1 => 'pear/foo (version >= 1.0) is required by installed package "pear/next"', ), ), $fakelog->getLog(), 'foo'); echo 'tests done'; http://cvs.php.net/diff.php/pear-core/tests/PEAR_Installer/test_uninstall_optionaldep.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Installer/test_uninstall_optionaldep.phpt diff -u pear-core/tests/PEAR_Installer/test_uninstall_optionaldep.phpt:1.2 pear-core/tests/PEAR_Installer/test_uninstall_optionaldep.phpt:1.3 --- pear-core/tests/PEAR_Installer/test_uninstall_optionaldep.phpt:1.2 Thu Feb 3 23:51:06 2005 +++ pear-core/tests/PEAR_Installer/test_uninstall_optionaldep.phpt Sun May 22 22:06:15 2005 @@ -42,7 +42,7 @@ $phpunit->assertEquals( array ( 0 => array ( - 0 => 'pear/bar (version >= 1.0) can be optionally used by installed package "pear/foo"', + 0 => 'pear/foo (version >= 1.0) can be optionally used by installed package "pear/bar"', 1 => true, ), ) http://cvs.php.net/diff.php/pear-core/tests/PEAR_Installer/test_uninstall_simple_params_invalid.phpt?r1=1.4&r2=1.5&ty=u Index: pear-core/tests/PEAR_Installer/test_uninstall_simple_params_invalid.phpt diff -u pear-core/tests/PEAR_Installer/test_uninstall_simple_params_invalid.phpt:1.4 pear-core/tests/PEAR_Installer/test_uninstall_simple_params_invalid.phpt:1.5 --- pear-core/tests/PEAR_Installer/test_uninstall_simple_params_invalid.phpt:1.4 Mon Feb 7 14:23:31 2005 +++ pear-core/tests/PEAR_Installer/test_uninstall_simple_params_invalid.phpt Sun May 22 22:06:15 2005 @@ -52,7 +52,7 @@ $phpunit->assertEquals(array ( 0 => array ( - 0 => 'pear/bar (version >= 1.0) is required by installed package "pear/next"', + 0 => 'pear/next (version >= 1.0) is required by installed package "pear/bar"', 1 => true, ), ), $fakelog->getLog(), 'next'); http://cvs.php.net/diff.php/pear-core/tests/PEAR_test_mock_pearweb.php.inc?r1=1.16&r2=1.17&ty=u Index: pear-core/tests/PEAR_test_mock_pearweb.php.inc diff -u pear-core/tests/PEAR_test_mock_pearweb.php.inc:1.16 pear-core/tests/PEAR_test_mock_pearweb.php.inc:1.17 --- pear-core/tests/PEAR_test_mock_pearweb.php.inc:1.16 Wed May 11 09:15:53 2005 +++ pear-core/tests/PEAR_test_mock_pearweb.php.inc Sun May 22 22:06:15 2005 @@ -4,6 +4,7 @@ class PEAR_test_mock_pearweb { var $_config; var $_remote; + var $_xmlrpcCalls = array(); function setRemote(&$r) { @@ -67,6 +68,13 @@ return $ret; } + function getXmlrpcCalls() + { + $ret = $this->_xmlrpcCalls; + $this->_xmlrpcCalls = array(); + return $ret; + } + function tryParentREST($address) { require_once 'PEAR/REST.php'; @@ -121,6 +129,7 @@ function call($server, $method, $params = null) { + $this->_xmlrpcCalls[] = array($server, $method, $params); if (!isset($this->_config['xmlrpc'][$server][$method])) { include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'php_dump.php.inc'; $args = $params; http://cvs.php.net/co.php/pear-core/tests/PEAR_Downloader/test_bug4285.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Downloader/test_bug4285.phpt +++ pear-core/tests/PEAR_Downloader/test_bug4285.phpt --TEST-- PEAR_Downloader bug 4285 test --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc'; $_test_dep->setPhpversion('4.2'); $_test_dep->setPEARVersion('1.4.0a1'); $chan = new PEAR_ChannelFile; $chan->setName('pear.chiaraquartet.net'); $chan->setSummary('hi'); $chan->setDefaultPEARProtocols(); $reg = &$config->getRegistry(); $reg->addChannel($chan); $mainpackage = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'packages'. DIRECTORY_SEPARATOR . 'package-bug4285.xml'; $requiredpackage = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'packages'. DIRECTORY_SEPARATOR . 'Chiara_XML_RPC5-0.3.0.tgz'; $dp = &new test_PEAR_Downloader($fakelog, array(), $config); $phpunit->assertNoErrors('after create'); $result = $dp->download(array($mainpackage, $requiredpackage)); $phpunit->assertEquals(array(), $result, 'result'); $phpunit->assertEquals(array ( 0 => array ( 0 => 3, 1 => '+ tmp dir created at ' . $dp->getDownloadDir(), ), 1 => array ( 0 => 2, 1 => 'pear/PEAR: Skipping required dependency "pear.chiaraquartet.net/Chiara_XML_RPC5", will be installed', ), 2 => array ( 0 => 0, 1 => 'pear.chiaraquartet.net/Chiara_XML_RPC5 requires PHP (version >= 5.0.3, version <= 6.0.0), installed version is 4.2', ), 3 => array ( 0 => 0, 1 => 'pear/PEAR requires package "pear.chiaraquartet.net/Chiara_XML_RPC5" (version >= 0.3.0)', ), ) , $fakelog->getLog(), 'log'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Downloader/test_download_abstractpackage_rest.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Downloader/test_download_abstractpackage_rest.phpt +++ pear-core/tests/PEAR_Downloader/test_download_abstractpackage_rest.phpt --TEST-- PEAR_Downloader->download() with downloadable abstract package (REST-based channel) --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc'; $reg = &$config->getRegistry(); $chan = &$reg->getChannel('pear.php.net'); $chan->setBaseURL('REST1.0', 'http://pear.php.net/rest/'); $reg->updateChannel($chan); $pathtopackagexml = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'packages'. DIRECTORY_SEPARATOR . 'test-1.0.tgz'; $GLOBALS['pearweb']->addHtmlConfig('http://www.example.com/test-1.0.tgz', $pathtopackagexml); $pearweb->addRESTConfig("http://pear.php.net/rest/r/test/allreleases.xml", '<?xml version="1.0"?> <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"> <p>test</p> <c>pear.php.net</c> <r><v>1.1</v><s>devel</s></r> <r><v>1.0</v><s>stable</s></r> <r><v>0.10-b1</v><s>beta</s></r> <r><v>0.9</v><s>stable</s></r> <r><v>0.4</v><s>stable</s></r> <r><v>0.3</v><s>stable</s></r> </a>', 'text/xml'); $pearweb->addRESTConfig("http://pear.php.net/rest/r/test/1.0.xml", '<?xml version="1.0"?> <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"> <p xlink:href="/rest/p/test">test</p> <c>pear.php.net</c> <v>1.0</v> <st>alpha</st> <l>PHP License</l> <m>cellog</m> <s>test</s> <d>test</d> <da>2005-04-17 18:40:51</da> <n>test</n> <f>252733</f> <g>http://www.example.com/test-1.0</g> <x xlink:href="package.1.0.xml"/> </r>', 'text/xml'); $pearweb->addRESTConfig("http://pear.php.net/rest/r/test/deps.1.0.txt", 'b:0;', 'text/plain'); $dp = &new test_PEAR_Downloader($fakelog, array(), $config); $phpunit->assertNoErrors('after create'); $result = $dp->download(array('test')); $phpunit->assertEquals(1, count($result), 'return'); $phpunit->assertIsa('test_PEAR_Downloader_Package', $result[0], 'right class'); $phpunit->assertIsa('PEAR_PackageFile_v1', $pf = $result[0]->getPackageFile(), 'right kind of pf'); $phpunit->assertEquals('test', $pf->getPackage(), 'right package'); $phpunit->assertEquals('pear.php.net', $pf->getChannel(), 'right channel'); $dlpackages = $dp->getDownloadedPackages(); $phpunit->assertEquals(1, count($dlpackages), 'downloaded packages count'); $phpunit->assertEquals(3, count($dlpackages[0]), 'internals package count'); $phpunit->assertEquals(array('file', 'info', 'pkg'), array_keys($dlpackages[0]), 'indexes'); $phpunit->assertEquals($dp->getDownloadDir() . DIRECTORY_SEPARATOR . 'test-1.0.tgz', $dlpackages[0]['file'], 'file'); $phpunit->assertIsa('PEAR_PackageFile_v1', $dlpackages[0]['info'], 'info'); $phpunit->assertEquals('test', $dlpackages[0]['pkg'], 'test'); $after = $dp->getDownloadedPackages(); $phpunit->assertEquals(0, count($after), 'after getdp count'); $phpunit->assertEquals(array ( 0 => array ( 0 => 3, 1 => '+ tmp dir created at ' . $dp->getDownloadDir(), ), 1 => array ( 0 => 1, 1 => 'downloading test-1.0.tgz ...', ), 2 => array ( 0 => 1, 1 => 'Starting to download test-1.0.tgz (785 bytes)', ), 3 => array ( 0 => 1, 1 => '.', ), 4 => array ( 0 => 1, 1 => '...done: 785 bytes', ), ), $fakelog->getLog(), 'log messages'); $phpunit->assertEquals(array ( 0 => array ( 0 => 'setup', 1 => 'self', ), 1 => array ( 0 => 'saveas', 1 => 'test-1.0.tgz', ), 2 => array ( 0 => 'start', 1 => array ( 0 => 'test-1.0.tgz', 1 => '785', ), ), 3 => array ( 0 => 'bytesread', 1 => 785, ), 4 => array ( 0 => 'done', 1 => 785, ), ), $fakelog->getDownload(), 'download callback messages'); $phpunit->assertEquals(array( 0 => array ( 0 => 'http://pear.php.net/rest/r/test/allreleases.xml', 1 => '200', ), 1 => array ( 0 => 'http://pear.php.net/rest/r/test/1.0.xml', 1 => '200', ), 2 => array ( 0 => 'http://pear.php.net/rest/r/test/deps.1.0.txt', 1 => '200', ), ), $pearweb->getRestCalls(), 'rest calls'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Channelfile/test_getpath.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Channelfile/test_getpath.phpt +++ pear-core/tests/PEAR_Channelfile/test_getpath.phpt --TEST-- PEAR_Channelfile->getPath() --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); chdir(dirname(__FILE__)); require_once './setup.php.inc'; $chf->fromXmlString($first = '<?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php.net</name> <suggestedalias>pear</suggestedalias> <summary>PHP Extension and Application Repository</summary> <servers> <primary> <xmlrpc> <function version="1.0">channel.update</function> </xmlrpc> <soap> <function version="1.0">channel.update</function> </soap> </primary> <mirror host="blah"> <xmlrpc> <function version="1.0">channel.update</function> </xmlrpc> <soap> <function version="1.0">channel.update</function> </soap> </mirror> </servers> </channel>'); $phpt->assertTrue($chf->validate(), 'default parse'); $phpt->assertEquals('xmlrpc.php', $chf->getPath('xmlrpc'), 'default xmlrpc path, primary'); $phpt->assertEquals('xmlrpc.php', $chf->getPath('xmlrpc', 'blah'), 'default xmlrpc path, mirror'); $phpt->assertEquals('soap.php', $chf->getPath('soap'), 'default soap path, primary'); $phpt->assertEquals('soap.php', $chf->getPath('soap', 'blah'), 'default soap path, mirror'); $chf->fromXmlString($first = '<?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php.net</name> <suggestedalias>pear</suggestedalias> <summary>PHP Extension and Application Repository</summary> <servers> <primary> <xmlrpc path="234"> <function version="1.0">channel.update</function> </xmlrpc> <soap path="hi/foo.php"> <function version="1.0">channel.update</function> </soap> </primary> <mirror host="blah"> <xmlrpc path="345"> <function version="1.0">channel.update</function> </xmlrpc> <soap path="hiow"> <function version="1.0">channel.update</function> </soap> </mirror> </servers> </channel>'); $phpt->assertTrue($chf->validate(), 'default parse'); $phpt->assertEquals('234', $chf->getPath('xmlrpc'), '234 xmlrpc path, primary'); $phpt->assertEquals('345', $chf->getPath('xmlrpc', 'blah'), 'hi/foo.php xmlrpc path, mirror'); $phpt->assertEquals('hi/foo.php', $chf->getPath('soap'), '345 soap path, primary'); $phpt->assertEquals('hiow', $chf->getPath('soap', 'blah'), 'hiow soap path, mirror'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Channelfile/test_getport.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Channelfile/test_getport.phpt +++ pear-core/tests/PEAR_Channelfile/test_getport.phpt --TEST-- PEAR_Channelfile->getPort() --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); chdir(dirname(__FILE__)); require_once './setup.php.inc'; $chf->fromXmlString($first = '<?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php.net</name> <suggestedalias>pear</suggestedalias> <summary>PHP Extension and Application Repository</summary> <servers> <primary> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </primary> <mirror host="blah"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </mirror> </servers> </channel>'); $phpt->assertTrue($chf->validate(), 'default parse'); $phpt->assertEquals(80, $chf->getPort(), '80 (default)'); $phpt->assertEquals(80, $chf->getPort('blah'), '80 mirror (default)'); $chf->fromXmlString($first = '<?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php.net</name> <suggestedalias>pear</suggestedalias> <summary>PHP Extension and Application Repository</summary> <servers> <primary ssl="yes"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </primary> <mirror host="blah" ssl="yes"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </mirror> </servers> </channel>'); $phpt->assertTrue($chf->validate(), 'ssl default parse'); $phpt->assertEquals(443, $chf->getPort(), '443 (default ssl)'); $phpt->assertEquals(443, $chf->getPort('blah'), '443 mirror (default ssl)'); $chf->fromXmlString($first = '<?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php.net</name> <suggestedalias>pear</suggestedalias> <summary>PHP Extension and Application Repository</summary> <servers> <primary port="2525"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </primary> <mirror host="blah" port="2524"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </mirror> </servers> </channel>'); $phpt->assertTrue($chf->validate(), 'second parse'); $phpt->assertEquals('2525', $chf->getPort(), '2525'); $phpt->assertEquals('2524', $chf->getPort('blah'), '2524'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Channelfile/test_getssl.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Channelfile/test_getssl.phpt +++ pear-core/tests/PEAR_Channelfile/test_getssl.phpt --TEST-- PEAR_Channelfile->getSsl() --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); chdir(dirname(__FILE__)); require_once './setup.php.inc'; $chf->fromXmlString($first = '<?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php.net</name> <suggestedalias>pear</suggestedalias> <summary>PHP Extension and Application Repository</summary> <servers> <primary> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </primary> <mirror host="blah"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </mirror> </servers> </channel>'); $phpt->assertTrue($chf->validate(), 'default parse'); $phpt->assertFalse($chf->getSsl(), 'main 1'); $phpt->assertFalse($chf->getSsl('blah'), 'mirror 1'); $chf->fromXmlString($first = '<?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php.net</name> <suggestedalias>pear</suggestedalias> <summary>PHP Extension and Application Repository</summary> <servers> <primary ssl="yes"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </primary> <mirror host="blah" ssl="yes"> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.0">channel.listAll</function> <function version="1.0">channel.update</function> </xmlrpc> </mirror> </servers> </channel>'); $phpt->assertTrue($chf->validate(), '2 parse'); $phpt->assertTrue($chf->getSsl(), 'main 2'); $phpt->assertTrue($chf->getSsl('blah'), 'mirror 2'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Channelfile/test_setport.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Channelfile/test_setport.phpt +++ pear-core/tests/PEAR_Channelfile/test_setport.phpt --TEST-- PEAR_Channelfile->getPath() --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); chdir(dirname(__FILE__)); require_once './setup.php.inc'; $phpt->assertTrue($chf->setPort(234), 'first time'); $phpt->assertEquals(234, $chf->getPort(), 'first'); $res = $chf->setPort(234, 'notfound'); $phpt->assertErrors(array( array('package' => 'PEAR_ChannelFile', 'message' => 'Mirror "notfound" does not exist') ), 'errors'); $phpt->assertFalse($res, 'notfound time'); $chf->setName('hi'); $chf->addMirror('blah', 142); $phpt->assertEquals(142, $chf->getPort('blah'), 'blah first'); $res = $chf->setPort(81, 'blah'); $phpt->assertEquals(81, $chf->getPort('blah'), 'blah second'); $chf->addMirror('greg'); $phpt->assertEquals(80, $chf->getPort('greg'), 'greg first'); $res = $chf->setPort(82, 'greg'); $phpt->assertEquals(81, $chf->getPort('blah'), 'blah third'); $phpt->assertEquals(82, $chf->getPort('greg'), 'greg second'); $phpt->assertEquals(234, $chf->getPort(), 'main second'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Install/install/packages/dependsonpecl.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Install/install/packages/dependsonpecl.xml +++ pear-core/tests/PEAR_Command_Install/install/packages/dependsonpecl.xml <?xml version="1.0" encoding="ISO-8859-1"?> <!--DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"--> <package version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/package-1.0 http://pear.php.net/dtd/package-1.0.xsd"> <name>PEAR</name> <summary>PEAR Base System</summary> <description>hi </description> <maintainers> <maintainer> <user>cellog</user> <role>lead</role> <name>Greg Beaver</name> <email>cellog@php.net</email> </maintainer> </maintainers> <release> <version>1.4.0a1</version> <date>2004-10-21</date> <license>PHP License</license> <state>alpha</state> <notes> and HTML_Template_Flexy installation was attempted) </notes> <deps> <dep type="pkg" rel="has">radius</dep> </deps> <filelist> <dir name="/"> <file name="foo.php" role="php"/> </dir> </filelist> </release> </package> http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Install/install/packages/peclpackage.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Install/install/packages/peclpackage.xml +++ pear-core/tests/PEAR_Command_Install/install/packages/peclpackage.xml <?xml version="1.0"?> <package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> <name>peclpkg</name> <channel>pecl.php.net</channel> <summary>extension package source package</summary> <description>extension source </description> <lead> <name>Greg Beaver</name> <user>cellog</user> <email>cellog@php.net</email> <active>yes</active> </lead> <date>2004-09-30</date> <version> <release>1.3.0</release> <api>1.3.0</api> </version> <stability> <release>stable</release> <api>stable</api> </stability> <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes>stuff </notes> <contents> <dir name="/"> <file name="foo.php" role="src"/> </dir> </contents> <dependencies> <required> <php> <min>4.2.0</min> </php> <pearinstaller> <min>1.4.0dev13</min> </pearinstaller> </required> </dependencies> <providesextension>extpkg</providesextension> <extsrcrelease/> </package> http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Install/install/test_dependsonpecl.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Install/install/test_dependsonpecl.phpt +++ pear-core/tests/PEAR_Command_Install/install/test_dependsonpecl.phpt --TEST-- install command, package.xml 1.0 package depends on pecl --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'setup.php.inc'; $pathtopackagexml = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'packages'. DIRECTORY_SEPARATOR . 'dependsonpecl.xml'; PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $pearweb->addXmlrpcConfig("pear.php.net", "package.getDepDownloadURL", array ( 0 => '1.0', 1 => array ( 'type' => 'pkg', 'rel' => 'has', 'name' => 'radius', 'channel' => 'pear.php.net', 'package' => 'radius', ), 2 => array ( 'channel' => 'pear.php.net', 'package' => 'PEAR', 'version' => '1.4.0a1', ), 3 => 'stable', ), new PEAR_Error('no package "radius" exists')); PEAR::popErrorHandling(); $pearweb->addXmlrpcConfig("pecl.php.net", "package.getDepDownloadURL", array ( 0 => '2.0', 1 => array ( 'channel' => 'pecl.php.net', 'name' => 'radius', ), 2 => array ( 'channel' => 'pear.php.net', 'package' => 'PEAR', 'version' => '1.4.0a1', ), 3 => 'stable', ), array('version' => '1.5.2', 'info' => '<?xml version="1.0"?> <package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> <name>peclpkg</name> <channel>pecl.php.net</channel> <summary>extension package source package</summary> <description>extension source </description> <lead> <name>Greg Beaver</name> <user>cellog</user> <email>cellog@php.net</email> <active>yes</active> </lead> <date>2004-09-30</date> <version> <release>1.3.0</release> <api>1.3.0</api> </version> <stability> <release>stable</release> <api>stable</api> </stability> <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes>stuff </notes> <contents> <dir name="/"> <file name="foo.php" role="src"/> </dir> </contents> <dependencies> <required> <php> <min>4.2.0</min> </php> <pearinstaller> <min>1.4.0dev13</min> </pearinstaller> </required> </dependencies> <providesextension>extpkg</providesextension> <extsrcrelease/> </package>', 'url' => 'http://pecl.php.net/get/peclpackage-1.3.0') ); $res = $command->run('install', array(), array($pathtopackagexml)); $phpunit->assertNoErrors('after install'); $phpunit->assertTrue($res, 'result'); $dl = &$command->getDownloader(1, array()); $phpunit->assertEquals(array ( 0 => array ( 0 => 3, 1 => '+ tmp dir created at ' . $dl->getDownloadDir(), ), 1 => array ( 0 => 3, 1 => 'Notice: package "pear/PEAR" required dependency "pecl/radius" will not be automatically downloaded', ), 2 => array ( 0 => 1, 1 => 'Did not download dependencies: pecl/radius, use --alldeps or --onlyreqdeps to download automatically', ), 3 => array ( 0 => 0, 1 => 'pear/PEAR requires package "pear/radius"', ), 4 => array ( 'info' => array ( 'data' => array ( 0 => array ( 0 => 'No valid packages found', ), ), 'headline' => 'Install Errors', ), 'cmd' => 'no command', ), ), $fakelog->getLog(), 'log messages'); $phpunit->assertEquals( array ( 0 => array ( 0 => 'pear.php.net', 1 => 'package.getDepDownloadURL', 2 => array ( 0 => '1.0', 1 => array ( 'type' => 'pkg', 'rel' => 'has', 'name' => 'radius', 'channel' => 'pear.php.net', 'package' => 'radius', ), 2 => array ( 'channel' => 'pear.php.net', 'package' => 'PEAR', 'version' => '1.4.0a1', ), 3 => 'stable', ), ), 1 => array ( 0 => 'pecl.php.net', 1 => 'package.getDepDownloadURL', 2 => array ( 0 => '2.0', 1 => array ( 'channel' => 'pecl.php.net', 'name' => 'radius', ), 2 => array ( 'channel' => 'pear.php.net', 'package' => 'PEAR', 'version' => '1.4.0a1', ), 3 => 'stable', ), ), ) , $pearweb->getXmlrpcCalls(), 'xmlrpc calls'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Package/package/packagefiles/test.php?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Package/package/packagefiles/test.php +++ pear-core/tests/PEAR_Command_Package/package/packagefiles/test.php <?php class Test {} ?> http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Remote/list-all/packages/channel.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Remote/list-all/packages/channel.xml +++ pear-core/tests/PEAR_Command_Remote/list-all/packages/channel.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <channel version="1.0" xmlns="http://pear.php.net/channel-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/channel-1.0 http://pear.php.net/dtd/channel-1.0.xsd"> <name>pear.php-tools.net</name> <summary>PHP Application Tools Channel</summary> <suggestedalias>pat</suggestedalias> <servers> <primary> <xmlrpc> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.1">package.getDownloadURL</function> <function version="1.0">package.getDepDownloadURL</function> <function version="1.1">package.getDepDownloadURL</function> <function version="1.0">package.search</function> <function version="1.0">channel.listAll</function> </xmlrpc> </primary> </servers> </channel> http://cvs.php.net/co.php/pear-core/tests/PEAR_Downloader/packages/package-bug4285.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_Downloader/packages/package-bug4285.xml +++ pear-core/tests/PEAR_Downloader/packages/package-bug4285.xml <?xml version="1.0"?> <package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> <name>PEAR</name> <channel>pear.php.net</channel> <summary>PEAR Base System</summary> <description>The PEAR package contains: * the PEAR installer, for creating, distributing </description> <lead> <name>Greg Beaver</name> <user>cellog</user> <email>cellog@php.net</email> <active>yes</active> </lead> <date>2005-04-24</date> <version> <release>1.4.0a12</release> <api>1.4.0</api> </version> <stability> <release>alpha</release> <api>alpha</api> </stability> <license uri="http://www.php.net/license">PHP License</license> <notes> This is a major milestone release for PEAR. In addition to several killer features, </notes> <contents> <dir name="/"> <file role="php" name="main-1.0.tgz"/> </dir> <!-- / --> </contents> <dependencies> <required> <php> <min>4.2</min> </php> <pearinstaller> <min>1.4.0a1</min> </pearinstaller> <package> <name>Chiara_XML_RPC5</name> <channel>pear.chiaraquartet.net</channel> <min>0.3.0</min> </package> </required> </dependencies> <phprelease/> </package>
« previous php.pear.cvs (#32018) next »