cvs: pear-core /tests _test_validate.php.inc package-PEARtests.xml pear_channelfile.phpt pear_installer1.phpt pear_installer_install_channels.phpt
pear_packager.phpt
| From: | Greg Beaver | Date: | Sun, 04 Jul 2004 04:21:47 +0000 |
| Subject: | cvs: pear-core /tests _test_validate.php.inc package-PEARtests.xml pear_channelfile.phpt pear_installer1.phpt pear_installer_install_channels.phpt pear_packager.phpt |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21480@lists.php.net to get a copy of this message | ||
cellog Sun Jul 4 00:21:47 2004 EDT
Added files:
/pear-core/tests _test_validate.php.inc
Modified files:
/pear-core/tests package-PEARtests.xml pear_channelfile.phpt
pear_installer1.phpt
pear_installer_install_channels.phpt
pear_packager.phpt
Log:
finish unit test updates
http://cvs.php.net/diff.php/pear-core/tests/package-PEARtests.xml?r1=1.7&r2=1.8&ty=u Index: pear-core/tests/package-PEARtests.xml diff -u pear-core/tests/package-PEARtests.xml:1.7 pear-core/tests/package-PEARtests.xml:1.8 --- pear-core/tests/package-PEARtests.xml:1.7 Fri Jul 2 17:35:28 2004 +++ pear-core/tests/package-PEARtests.xml Sun Jul 4 00:21:47 2004 @@ -13,8 +13,8 @@ </maintainer> </maintainers> <release> - <version>2.2</version> - <date>2004-06-10</date> + <version>2.3</version> + <date>2004-07-03</date> <license>PHP License</license> <state>stable</state> <notes>Installation package.xml for PEAR package tests</notes> @@ -83,6 +83,7 @@ <file role="test" name="test.dat"/> </dir> <!-- test-pkg6/goompness --> </dir> <!-- test-pkg6 --> + <file role="test" name="_test_validate.php.inc"/> <file role="test" name="common_sortPkgDeps1_package.xml"/> <file role="test" name="common_sortPkgDeps2_package.xml"/> <file role="test" name="common_sortPkgDeps3_package.xml"/> http://cvs.php.net/diff.php/pear-core/tests/pear_channelfile.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/pear_channelfile.phpt diff -u pear-core/tests/pear_channelfile.phpt:1.2 pear-core/tests/pear_channelfile.phpt:1.3 --- pear-core/tests/pear_channelfile.phpt:1.2 Sun May 30 13:02:34 2004 +++ pear-core/tests/pear_channelfile.phpt Sun Jul 4 00:21:47 2004 @@ -95,8 +95,8 @@ var_dump($chf->toArray()); var_dump($chf->toXml()); -echo "\ntest add packagenameregex\n"; -$chf->setPackageNameRegex('[A-Z]+'); +echo "\ntest add validatepackage\n"; +$chf->setValidationPackage('PEAR_Validate', '1.0'); var_dump($chf->toArray()); var_dump($chf->toXml()); $chf->fromXmlString($chf->toXml()); @@ -136,7 +136,7 @@ test default after parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -212,6 +212,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -254,7 +266,7 @@ " after re-parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -330,6 +342,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -373,7 +397,7 @@ test compatibility after parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -449,6 +473,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -491,7 +527,7 @@ " after re-parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -567,6 +603,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -608,8 +656,8 @@ </channel> " -test add packagenameregex -array(7) { +test add validatepackage +array(8) { ["version"]=> string(3) "1.0" ["name"]=> @@ -685,6 +733,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -697,16 +757,21 @@ string(5) "5.0.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } } -string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(887) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> <summary>PEAR packages for PHP 5</summary> <server>pear.php.net</server> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -730,7 +795,7 @@ " after re-parsing bool(true) -array(7) { +array(8) { ["version"]=> string(3) "1.0" ["name"]=> @@ -739,8 +804,13 @@ string(23) "PEAR packages for PHP 5" ["server"]=> string(12) "pear.php.net" - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -808,6 +878,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -821,13 +903,13 @@ } } } -string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(887) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> <summary>PEAR packages for PHP 5</summary> <server>pear.php.net</server> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -851,7 +933,7 @@ " test add protocols -array(8) { +array(9) { ["version"]=> string(3) "1.0" ["name"]=> @@ -860,8 +942,13 @@ string(23) "PEAR packages for PHP 5" ["server"]=> string(12) "pear.php.net" - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -929,6 +1016,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -970,7 +1069,7 @@ } } } -string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1084) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -981,7 +1080,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -1005,7 +1104,7 @@ " after re-parsing bool(true) -array(8) { +array(9) { ["version"]=> string(3) "1.0" ["name"]=> @@ -1042,8 +1141,13 @@ string(3) "1.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -1111,6 +1215,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -1124,7 +1240,7 @@ } } } -string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1084) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -1135,7 +1251,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -1159,7 +1275,7 @@ " test add mirror -array(9) { +array(10) { ["version"]=> string(3) "1.0" ["name"]=> @@ -1196,8 +1312,13 @@ string(3) "1.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -1265,6 +1386,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -1309,7 +1442,7 @@ } } } -string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1332) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -1320,7 +1453,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <mirrors> <mirror type="server" name="mirror.php.net"> <provides> @@ -1352,7 +1485,7 @@ " after re-parsing bool(true) -array(9) { +array(10) { ["version"]=> string(3) "1.0" ["name"]=> @@ -1389,8 +1522,13 @@ string(3) "1.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["mirrors"]=> array(1) { [1]=> @@ -1489,6 +1627,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -1502,7 +1652,7 @@ } } } -string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1332) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -1513,7 +1663,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <mirrors> <mirror type="server" name="mirror.php.net"> <provides> http://cvs.php.net/diff.php/pear-core/tests/pear_installer1.phpt?r1=1.8&r2=1.9&ty=u Index: pear-core/tests/pear_installer1.phpt diff -u pear-core/tests/pear_installer1.phpt:1.8 pear-core/tests/pear_installer1.phpt:1.9 --- pear-core/tests/pear_installer1.phpt:1.8 Tue Jun 1 10:29:59 2004 +++ pear-core/tests/pear_installer1.phpt Sun Jul 4 00:21:47 2004 @@ -11,6 +11,8 @@ require_once "PEAR/Installer.php"; require_once 'PEAR/ChannelFile.php'; +// fake channel validator - sidestep having to install this package +require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '_test_validate.php.inc'; $temp_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'testinstallertemp'; if (!is_dir($temp_path)) { @@ -26,7 +28,7 @@ $chan->setName('oddball'); $chan->setServer('example.com'); $chan->setSummary('oddball'); -$chan->setPackageNameRegex('[a-z][a-z0-9]*(?:\.[a-z0-9]+)*'); +$chan->setValidationPackage('test_Validate', '1.0'); $reg->addChannel($chan); $installer = new PEAR_Installer($ui); $installer->config = &$config; http://cvs.php.net/diff.php/pear-core/tests/pear_installer_install_channels.phpt?r1=1.3&r2=1.4&ty=u Index: pear-core/tests/pear_installer_install_channels.phpt diff -u pear-core/tests/pear_installer_install_channels.phpt:1.3 pear-core/tests/pear_installer_install_channels.phpt:1.4 --- pear-core/tests/pear_installer_install_channels.phpt:1.3 Tue Jun 1 10:29:59 2004 +++ pear-core/tests/pear_installer_install_channels.phpt Sun Jul 4 00:21:47 2004 @@ -191,7 +191,6 @@ Caught error: groob::pkg6conflict: conflicting files found: groob\goompness\oggbrzitzkee.php (frob::pkg6) groob\goompness\Mopreeb.php (frob::pkg6) - groob\goompness\test.dat (frob::pkg6) Test unknown channel: Error: Unknown channel, "gorp" http://cvs.php.net/diff.php/pear-core/tests/pear_packager.phpt?r1=1.6&r2=1.7&ty=u Index: pear-core/tests/pear_packager.phpt diff -u pear-core/tests/pear_packager.phpt:1.6 pear-core/tests/pear_packager.phpt:1.7 --- pear-core/tests/pear_packager.phpt:1.6 Tue Jun 1 09:22:28 2004 +++ pear-core/tests/pear_packager.phpt Sun Jul 4 00:21:47 2004 @@ -182,7 +182,7 @@ ["gid"]=> int(0) ["size"]=> - int(817) + int(929) ["typeflag"]=> string(0) "" } @@ -276,7 +276,7 @@ ["gid"]=> int(0) ["size"]=> - int(921) + int(1075) ["typeflag"]=> string(0) "" } http://cvs.php.net/co.php/pear-core/tests/_test_validate.php.inc?r=1.1&p=1 Index: pear-core/tests/_test_validate.php.inc +++ pear-core/tests/_test_validate.php.inc <?php require_once 'PEAR/Validate.php'; class test_Validate extends PEAR_Validate { var $packageregex = '[a-z][a-z0-9]*(?:\.[a-z0-9]+)*'; } ?>
http://cvs.php.net/diff.php/pear-core/tests/package-PEARtests.xml?r1=1.7&r2=1.8&ty=u Index: pear-core/tests/package-PEARtests.xml diff -u pear-core/tests/package-PEARtests.xml:1.7 pear-core/tests/package-PEARtests.xml:1.8 --- pear-core/tests/package-PEARtests.xml:1.7 Fri Jul 2 17:35:28 2004 +++ pear-core/tests/package-PEARtests.xml Sun Jul 4 00:21:47 2004 @@ -13,8 +13,8 @@ </maintainer> </maintainers> <release> - <version>2.2</version> - <date>2004-06-10</date> + <version>2.3</version> + <date>2004-07-03</date> <license>PHP License</license> <state>stable</state> <notes>Installation package.xml for PEAR package tests</notes> @@ -83,6 +83,7 @@ <file role="test" name="test.dat"/> </dir> <!-- test-pkg6/goompness --> </dir> <!-- test-pkg6 --> + <file role="test" name="_test_validate.php.inc"/> <file role="test" name="common_sortPkgDeps1_package.xml"/> <file role="test" name="common_sortPkgDeps2_package.xml"/> <file role="test" name="common_sortPkgDeps3_package.xml"/> http://cvs.php.net/diff.php/pear-core/tests/pear_channelfile.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/pear_channelfile.phpt diff -u pear-core/tests/pear_channelfile.phpt:1.2 pear-core/tests/pear_channelfile.phpt:1.3 --- pear-core/tests/pear_channelfile.phpt:1.2 Sun May 30 13:02:34 2004 +++ pear-core/tests/pear_channelfile.phpt Sun Jul 4 00:21:47 2004 @@ -95,8 +95,8 @@ var_dump($chf->toArray()); var_dump($chf->toXml()); -echo "\ntest add packagenameregex\n"; -$chf->setPackageNameRegex('[A-Z]+'); +echo "\ntest add validatepackage\n"; +$chf->setValidationPackage('PEAR_Validate', '1.0'); var_dump($chf->toArray()); var_dump($chf->toXml()); $chf->fromXmlString($chf->toXml()); @@ -136,7 +136,7 @@ test default after parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -212,6 +212,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -254,7 +266,7 @@ " after re-parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -330,6 +342,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -373,7 +397,7 @@ test compatibility after parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -449,6 +473,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -491,7 +527,7 @@ " after re-parsing bool(true) -array(6) { +array(7) { ["version"]=> string(3) "1.0" ["name"]=> @@ -567,6 +603,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -608,8 +656,8 @@ </channel> " -test add packagenameregex -array(7) { +test add validatepackage +array(8) { ["version"]=> string(3) "1.0" ["name"]=> @@ -685,6 +733,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -697,16 +757,21 @@ string(5) "5.0.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } } -string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(887) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> <summary>PEAR packages for PHP 5</summary> <server>pear.php.net</server> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -730,7 +795,7 @@ " after re-parsing bool(true) -array(7) { +array(8) { ["version"]=> string(3) "1.0" ["name"]=> @@ -739,8 +804,13 @@ string(23) "PEAR packages for PHP 5" ["server"]=> string(12) "pear.php.net" - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -808,6 +878,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -821,13 +903,13 @@ } } } -string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(887) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> <summary>PEAR packages for PHP 5</summary> <server>pear.php.net</server> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -851,7 +933,7 @@ " test add protocols -array(8) { +array(9) { ["version"]=> string(3) "1.0" ["name"]=> @@ -860,8 +942,13 @@ string(23) "PEAR packages for PHP 5" ["server"]=> string(12) "pear.php.net" - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -929,6 +1016,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -970,7 +1069,7 @@ } } } -string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1084) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -981,7 +1080,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -1005,7 +1104,7 @@ " after re-parsing bool(true) -array(8) { +array(9) { ["version"]=> string(3) "1.0" ["name"]=> @@ -1042,8 +1141,13 @@ string(3) "1.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -1111,6 +1215,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -1124,7 +1240,7 @@ } } } -string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1084) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -1135,7 +1251,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <subchannels> <subchannel name="pear5.qa" server="qa.pear.php.net"> <summary>Quality Assurance releases of unmaintained packages</summary> @@ -1159,7 +1275,7 @@ " test add mirror -array(9) { +array(10) { ["version"]=> string(3) "1.0" ["name"]=> @@ -1196,8 +1312,13 @@ string(3) "1.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["subchannels"]=> array(2) { [1]=> @@ -1265,6 +1386,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -1309,7 +1442,7 @@ } } } -string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1332) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -1320,7 +1453,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <mirrors> <mirror type="server" name="mirror.php.net"> <provides> @@ -1352,7 +1485,7 @@ " after re-parsing bool(true) -array(9) { +array(10) { ["version"]=> string(3) "1.0" ["name"]=> @@ -1389,8 +1522,13 @@ string(3) "1.0" } } - ["packagenameregex"]=> - string(6) "[A-Z]+" + ["validatepackage"]=> + array(2) { + ["version"]=> + string(3) "1.0" + ["name"]=> + string(13) "PEAR_Validate" + } ["mirrors"]=> array(1) { [1]=> @@ -1489,6 +1627,18 @@ } } } + ["release_deps"]=> + array(1) { + [1]=> + array(3) { + ["type"]=> + string(3) "php" + ["rel"]=> + string(2) "ge" + ["version"]=> + string(5) "5.0.0" + } + } ["deps"]=> array(1) { [1]=> @@ -1502,7 +1652,7 @@ } } } -string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?> +string(1332) "<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0"> <channel version="1.0"> <name>pear5</name> @@ -1513,7 +1663,7 @@ <protocol type="xml-rpc" version="1.0">release.list</protocol> <protocol type="get" version="1.0"/> </provides> - <packagenameregex>[A-Z]+</packagenameregex> + <validatepackage version="1.0">PEAR_Validate</validatepackage> <mirrors> <mirror type="server" name="mirror.php.net"> <provides> http://cvs.php.net/diff.php/pear-core/tests/pear_installer1.phpt?r1=1.8&r2=1.9&ty=u Index: pear-core/tests/pear_installer1.phpt diff -u pear-core/tests/pear_installer1.phpt:1.8 pear-core/tests/pear_installer1.phpt:1.9 --- pear-core/tests/pear_installer1.phpt:1.8 Tue Jun 1 10:29:59 2004 +++ pear-core/tests/pear_installer1.phpt Sun Jul 4 00:21:47 2004 @@ -11,6 +11,8 @@ require_once "PEAR/Installer.php"; require_once 'PEAR/ChannelFile.php'; +// fake channel validator - sidestep having to install this package +require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '_test_validate.php.inc'; $temp_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'testinstallertemp'; if (!is_dir($temp_path)) { @@ -26,7 +28,7 @@ $chan->setName('oddball'); $chan->setServer('example.com'); $chan->setSummary('oddball'); -$chan->setPackageNameRegex('[a-z][a-z0-9]*(?:\.[a-z0-9]+)*'); +$chan->setValidationPackage('test_Validate', '1.0'); $reg->addChannel($chan); $installer = new PEAR_Installer($ui); $installer->config = &$config; http://cvs.php.net/diff.php/pear-core/tests/pear_installer_install_channels.phpt?r1=1.3&r2=1.4&ty=u Index: pear-core/tests/pear_installer_install_channels.phpt diff -u pear-core/tests/pear_installer_install_channels.phpt:1.3 pear-core/tests/pear_installer_install_channels.phpt:1.4 --- pear-core/tests/pear_installer_install_channels.phpt:1.3 Tue Jun 1 10:29:59 2004 +++ pear-core/tests/pear_installer_install_channels.phpt Sun Jul 4 00:21:47 2004 @@ -191,7 +191,6 @@ Caught error: groob::pkg6conflict: conflicting files found: groob\goompness\oggbrzitzkee.php (frob::pkg6) groob\goompness\Mopreeb.php (frob::pkg6) - groob\goompness\test.dat (frob::pkg6) Test unknown channel: Error: Unknown channel, "gorp" http://cvs.php.net/diff.php/pear-core/tests/pear_packager.phpt?r1=1.6&r2=1.7&ty=u Index: pear-core/tests/pear_packager.phpt diff -u pear-core/tests/pear_packager.phpt:1.6 pear-core/tests/pear_packager.phpt:1.7 --- pear-core/tests/pear_packager.phpt:1.6 Tue Jun 1 09:22:28 2004 +++ pear-core/tests/pear_packager.phpt Sun Jul 4 00:21:47 2004 @@ -182,7 +182,7 @@ ["gid"]=> int(0) ["size"]=> - int(817) + int(929) ["typeflag"]=> string(0) "" } @@ -276,7 +276,7 @@ ["gid"]=> int(0) ["size"]=> - int(921) + int(1075) ["typeflag"]=> string(0) "" } http://cvs.php.net/co.php/pear-core/tests/_test_validate.php.inc?r=1.1&p=1 Index: pear-core/tests/_test_validate.php.inc +++ pear-core/tests/_test_validate.php.inc <?php require_once 'PEAR/Validate.php'; class test_Validate extends PEAR_Validate { var $packageregex = '[a-z][a-z0-9]*(?:\.[a-z0-9]+)*'; } ?>