cvs: pear-core /PEAR Registry.php /PEAR/Command Registry.php /tests/PEAR_Command test_registerCommands_standard.phpt
/tests/PEAR_Command_Registry/list test_allchannels.phpt test_default_channel.phpt test_fail.phpt test_fail_list-files.phpt test_installed.phpt
test_normal.phpt test_notinstalled.phpt test_opt.phpt /tests/PEAR_Command_Registry/list/packagefiles package-Console_Getopt.xml package.xml
package2.xml

From: Date: Sat, 27 Nov 2004 07:01:31 +0000
Subject: cvs: pear-core /PEAR Registry.php /PEAR/Command Registry.php /tests/PEAR_Command test_registerCommands_standard.phpt
/tests/PEAR_Command_Registry/list test_allchannels.phpt test_default_channel.phpt test_fail.phpt test_fail_list-files.phpt test_installed.phpt
test_normal.phpt test_notinstalled.phpt test_opt.phpt /tests/PEAR_Command_Registry/list/packagefiles package-Console_Getopt.xml package.xml
package2.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-26567@lists.php.net to get a copy of this message
cellog Sat Nov 27 02:01:31 2004 EDT Added files: /pear-core/tests/PEAR_Command_Registry/list/packagefiles package-Console_Getopt.xml package.xml package2.xml /pear-core/tests/PEAR_Command_Registry/list test_allchannels.phpt test_default_channel.phpt test_fail.phpt test_fail_list-files.phpt test_installed.phpt test_normal.phpt test_notinstalled.phpt test_opt.phpt Modified files: /pear-core/PEAR/Command Registry.php /pear-core/PEAR Registry.php /pear-core/tests/PEAR_Command test_registerCommands_standard.phpt Log: remove unneeded list-installed command, add --allchannels option to list to replace it test pear list command

http://cvs.php.net/diff.php/pear-core/PEAR/Command/Registry.php?r1=1.49&r2=1.50&ty=u Index: pear-core/PEAR/Command/Registry.php diff -u pear-core/PEAR/Command/Registry.php:1.49 pear-core/PEAR/Command/Registry.php:1.50 --- pear-core/PEAR/Command/Registry.php:1.49 Fri Nov 26 14:33:53 2004 +++ pear-core/PEAR/Command/Registry.php Sat Nov 27 02:01:31 2004 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.49 2004/11/26 19:33:53 cellog Exp $ +// $Id: Registry.php,v 1.50 2004/11/27 07:01:31 cellog Exp $ require_once 'PEAR/Command/Common.php'; require_once 'PEAR/Registry.php'; @@ -38,6 +38,10 @@ 'doc' => 'list installed packages from this channel', 'arg' => 'CHAN', ), + 'allchannels' => array( + 'shortopt' => 'a', + 'doc' => 'list installed packages from all channels', + ), ), 'doc' => '<package> If invoked without parameters, this command lists the PEAR packages @@ -45,15 +49,6 @@ lists the files in a package. ', ), - 'list-installed' => array( - 'summary' => 'List All Installed Packages In All Channels', - 'function' => 'doListAll', - 'shortcut' => 'lin', - 'options' => array(), - 'doc' => ' -List all installed packages in all channels. -' - ), 'list-files' => array( 'summary' => 'List Files In Installed Package', 'function' => 'doFileList', @@ -112,15 +107,18 @@ function doList($command, $options, $params) { + if (isset($options['allchannels'])) { + return $this->doListAll($command, array(), $params); + } $reg = &$this->config->getRegistry(); - if (sizeof($params) == 1) { + if (count($params) == 1) { return $this->doFileList($command, $options, $params); } if (isset($options['channel'])) { if ($reg->channelExists($options['channel'])) { $channel = $reg->channelName($options['channel']); } else { - return $this->raiseError("Channel `$options[channel]' does not exist"); + return $this->raiseError('Channel "' . $options['channel'] .'" does not exist'); } } else { $channel = $this->config->get('default_channel'); @@ -141,7 +139,7 @@ $pobj->getState() ? $pobj->getState() : null); } if (count($installed)==0) { - $data = '(no packages installed)'; + $data = '(no packages installed from channel ' . $channel . ')'; } $this->ui->outputData($data, $command); return true; @@ -150,32 +148,28 @@ function doListAll($command, $options, $params) { $reg = &$this->config->getRegistry(); - if (sizeof($params) == 0) { - $installed = $reg->packageInfo(null, null, null); - foreach ($installed as $channel => $packages) { - usort($packages, array($this, '_sortinfo')); - $i = $j = 0; + $installed = $reg->packageInfo(null, null, null); + foreach ($installed as $channel => $packages) { + usort($packages, array($this, '_sortinfo')); + $i = $j = 0; + $data = array( + 'caption' => 'Installed packages, channel ' . $channel . ':', + 'border' => true, + 'headline' => array('Package', 'Version', 'State') + ); + foreach ($packages as $package) { + $pobj = $reg->getPackage(isset($package['package']) ? + $package['package'] : $package['name'], $channel); + $data['data'][] = array($pobj->getPackage(), $pobj->getVersion(), + $pobj->getState() ? $pobj->getState() : null); + } + if (count($packages)==0) { $data = array( 'caption' => 'Installed packages, channel ' . $channel . ':', 'border' => true, - 'headline' => array('Channel', 'Package', 'Version', 'State') + 'data' => array(array('(no packages installed)')), ); - foreach ($packages as $package) { - $data['data'][] = array($channel, - $package['package'], - $package['version'], - @$package['release_state']); - } - if (count($packages)==0) { - $data = array( - 'caption' => 'Installed packages, channel ' . $channel . ':', - 'border' => true, - 'data' => array(array('(no packages installed)')), - ); - } - $this->ui->outputData($data, $command); } - } else { $this->ui->outputData($data, $command); } return true; @@ -183,6 +177,9 @@ function doFileList($command, $options, $params) { + if (count($params) != 1) { + return $this->raiseError('list-files expects 1 parameter'); + } $reg = &$this->config->getRegistry(); if ((file_exists($params[0]) && !is_dir($params[0])) || $fp = @fopen($params[0], 'r')) { @fclose($fp); @@ -217,7 +214,7 @@ 'caption' => $caption, 'border' => true, 'headline' => $headings); - if ($info->getPackagexmlVersion() == '1.0') { + if ($info->getPackagexmlVersion() == '1.0' || $installed) { foreach ($list as $file => $att) { if ($installed) { if (empty($att['installed_as'])) { @@ -248,43 +245,31 @@ $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . $dest; } - $dest = preg_replace('!/+!', '/', $dest); + $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; + $dest = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"), + array(DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR), + $dest); $file = preg_replace('!/+!', '/', $file); $data['data'][] = array($file, $dest); } } } else { // package.xml 2.0, not installed - if (isset($list['file']['attribs'])) { - $list['file'] = array($list['file']); + if (!isset($list['dir']['file'][0])) { + $list['dir']['file'] = array($list['dir']['file']); } - foreach ($list['file'] as $att) { + foreach ($list['dir']['file'] as $att) { $att = $att['attribs']; $file = $att['name']; - if (isset($att['baseinstalldir']) && !in_array($att['role'], - array('test', 'data', 'doc'))) { - $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR . - $file; + $role = &PEAR_Installer_Role::factory($info, $att['role'], $this->config); + $role->setup($this, $info, $att, $file); + if (!$role->isInstallable()) { + $dest = '(not installable)'; } else { - $dest = $file; - } - switch ($att['role']) { - case 'test': - case 'data': - case 'doc': - $role = $att['role']; - if ($role == 'test') { - $role .= 's'; - } - $dest = $this->config->get($role . '_dir') . DIRECTORY_SEPARATOR . - $info->getPackage() . DIRECTORY_SEPARATOR . $dest; - break; - case 'php': - default: - $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . - $dest; + list(,, $dest) = + $role->processInstallation($info, $att, $file, ''); } - $dest = preg_replace('!/+!', '/', $dest); - $file = preg_replace('!/+!', '/', $file); $data['data'][] = array($file, $dest); } } http://cvs.php.net/diff.php/pear-core/PEAR/Registry.php?r1=1.96&r2=1.97&ty=u Index: pear-core/PEAR/Registry.php diff -u pear-core/PEAR/Registry.php:1.96 pear-core/PEAR/Registry.php:1.97 --- pear-core/PEAR/Registry.php:1.96 Fri Nov 26 16:10:31 2004 +++ pear-core/PEAR/Registry.php Sat Nov 27 02:01:31 2004 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.96 2004/11/26 21:10:31 cellog Exp $ +// $Id: Registry.php,v 1.97 2004/11/27 07:01:31 cellog Exp $ /* TODO: @@ -1312,6 +1312,9 @@ } $ret = $this->_deleteChannel($channel); $this->_unlock(); + if ($ret && is_a($this->_config, 'PEAR_Config')) { + $this->_config->setChannels($this->listChannels()); + } return $ret; } @@ -1335,6 +1338,9 @@ } $ret = $this->_addChannel($channel, $update); $this->_unlock(); + if (!$update && $ret && is_a($this->_config, 'PEAR_Config')) { + $this->_config->setChannels($this->listChannels()); + } return $ret; } http://cvs.php.net/diff.php/pear-core/tests/PEAR_Command/test_registerCommands_standard.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Command/test_registerCommands_standard.phpt diff -u pear-core/tests/PEAR_Command/test_registerCommands_standard.phpt:1.2 pear-core/tests/PEAR_Command/test_registerCommands_standard.phpt:1.3 --- pear-core/tests/PEAR_Command/test_registerCommands_standard.phpt:1.2 Fri Nov 26 14:36:30 2004 +++ pear-core/tests/PEAR_Command/test_registerCommands_standard.phpt Sat Nov 27 02:01:31 2004 @@ -37,7 +37,6 @@ 'list-all' => 'PEAR_Command_Remote', 'list-channels' => 'PEAR_Command_Channels', 'list-files' => 'PEAR_Command_Registry', - 'list-installed' => 'PEAR_Command_Registry', 'list-upgrades' => 'PEAR_Command_Remote', 'login' => 'PEAR_Command_Auth', 'logout' => 'PEAR_Command_Auth', @@ -56,8 +55,8 @@ 'upgrade' => 'PEAR_Command_Install', 'upgrade-all' => 'PEAR_Command_Install', ), PEAR_Command::getCommands(), 'getcommands'); -$phpunit->assertEquals(43, count(PEAR_Command::getCommands()), 'count commands'); -$phpunit->assertEquals(43, count(PEAR_Command::getShortcuts()), 'count shortcuts'); +$phpunit->assertEquals(42, count(PEAR_Command::getCommands()), 'count commands'); +$phpunit->assertEquals(42, count(PEAR_Command::getShortcuts()), 'count shortcuts'); $phpunit->assertEquals(array ( 'b' => 'build', 'bun' => 'bundle', @@ -85,7 +84,6 @@ 'la' => 'list-all', 'lc' => 'list-channels', 'li' => 'login', - 'lin' => 'list-installed', 'lo' => 'logout', 'lu' => 'list-upgrades', 'p' => 'package', @@ -196,8 +194,8 @@ 11 => 'offline', ), $l, 'long install'); PEAR_Command::getGetoptArgs('list', $s, $l); -$phpunit->assertEquals('c:', $s, 'short list'); -$phpunit->assertEquals(array('channel='), $l, 'long list'); +$phpunit->assertEquals('c:a', $s, 'short list'); +$phpunit->assertEquals(array('channel=', 'allchannels'), $l, 'long list'); PEAR_Command::getGetoptArgs('list-all', $s, $l); $phpunit->assertEquals('c:', $s, 'short list-all'); $phpunit->assertEquals(array('channel='), $l, 'long list-all'); @@ -207,9 +205,6 @@ PEAR_Command::getGetoptArgs('list-files', $s, $l); $phpunit->assertEquals('', $s, 'short list-files'); $phpunit->assertEquals(array(), $l, 'long list-files'); -PEAR_Command::getGetoptArgs('list-installed', $s, $l); -$phpunit->assertEquals('', $s, 'short list-installed'); -$phpunit->assertEquals(array(), $l, 'long list-installed'); PEAR_Command::getGetoptArgs('list-upgrades', $s, $l); $phpunit->assertEquals('', $s, 'short list-upgrades'); $phpunit->assertEquals(array(), $l, 'long list-upgrades'); @@ -343,8 +338,6 @@ , PEAR_Command::getDescription('list-channels'), 'list-channels'); $phpunit->assertEquals('List Files In Installed Package' , PEAR_Command::getDescription('list-files'), 'list-files'); -$phpunit->assertEquals('List All Installed Packages In All Channels' - , PEAR_Command::getDescription('list-installed'), 'list-installed'); $phpunit->assertEquals('List Available Upgrades' , PEAR_Command::getDescription('list-upgrades'), 'list-upgrades'); $phpunit->assertEquals('Connects and authenticates to remote server' http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/packagefiles/package-Console_Getopt.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/packagefiles/package-Console_Getopt.xml +++ pear-core/tests/PEAR_Command_Registry/list/packagefiles/package-Console_Getopt.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE package SYSTEM "package.dtd"> <!-- do not use the "Type" attribute here, that one is only for generated package.xml files --> <package version="1.0"> <name>Console_Getopt</name> <summary>Command-line option parser</summary> <description>This is a PHP implementation of "getopt" supporting both short and long options.</description> <license>PHP License</license> <maintainers> <maintainer> <user>andrei</user> <role>lead</role> <name>Andrei Zmievski</name> <email>andrei@php.net</email> </maintainer> <maintainer> <user>ssb</user> <role>developer</role> <name>Stig Bakken</name> <email>stig@php.net</email> </maintainer> <maintainer> <user>cellog</user> <role>helper</role> <name>Greg Beaver</name> <email>cellog@php.net</email> </maintainer> </maintainers> <release> <version>1.2</version> <date>2003-12-11</date> <notes>Fix to preserve BC with 1.0 and allow correct behaviour for new users</notes> <state>stable</state> <filelist> <dir name="Console"> <file role="php" name="Getopt.php"/> </dir> </filelist> </release> <changelog> <release> <version>1.0</version> <date>2002-09-13</date> <notes>Stable release</notes> <state>stable</state> <filelist> <dir name="Console"> <file role="php" name="Getopt.php"/> </dir> </filelist> </release> <release> <version>0.11</version> <date>2002-05-26</date> <notes>POSIX getopt compatibility fix: treat first element of args array as command name </notes> <state>beta</state> <filelist> <dir name="Console"> <file role="php" name="Getopt.php"/> </dir> </filelist> </release> <release> <version>0.10</version> <date>2002-05-12</date> <notes>Packaging fix</notes> <state>beta</state> </release> <release> <version>0.9</version> <date>2002-05-12</date> <notes>Initial release</notes> <state>beta</state> </release> </changelog> </package> http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/packagefiles/package.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/packagefiles/package.xml +++ pear-core/tests/PEAR_Command_Registry/list/packagefiles/package.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>The PEAR package contains: * the PEAR installer, for creating, distributing and installing packages * the alpha-quality PEAR_Exception PHP5 error handling mechanism * the beta-quality PEAR_ErrorStack advanced error handling mechanism * the PEAR_Error error handling mechanism * the OS_Guess class for retrieving info about the OS where PHP is running on * the System class for quick handling of common operations with files and directories * the PEAR base class </description> <maintainers> <maintainer> <user>ssb</user> <role>lead</role> <name>Stig Bakken</name> <email>stig@php.net</email> </maintainer> <maintainer> <user>cellog</user> <role>lead</role> <name>Greg Beaver</name> <email>cellog@php.net</email> </maintainer> <maintainer> <user>cox</user> <role>lead</role> <name>Tomas V.V.Cox</name> <email>cox@idecnet.com</email> </maintainer> <maintainer> <user>pajoye</user> <role>lead</role> <name>Pierre-Alain Joye</name> <email>pajoye@pearfr.org</email> </maintainer> <maintainer> <user>mj</user> <role>developer</role> <name>Martin Jansen</name> <email>mj@php.net</email> </maintainer> </maintainers> <release> <version>1.4.0a1</version> <date>2004-10-21</date> <license>PHP License</license> <state>alpha</state> <notes> Installer Roles/Tasks: * package.xml 2.0 uses a command pattern, allowing extensibility * implement the replace, postinstallscript, and preinstallscript tasks Installer Dependency Support: * package.xml 2.0 has continued to improve and evolve * Downloader/Package.php is now used to coordinate downloading. Old code has not yet been deleted, as error handling is crappy right now. Uninstall ordering is broken, and needs to be redone. * Pre-download dependency resolution works, mostly. * There is no way to disable dependency resolution at the moment, this will be done. * Dependency2.php is used by the new PEAR_Downloader_Channel to resolve dependencies and include downloaded files in the calculations. * DependencyDB.php is used to resolve complex dependencies between installed packages and any dependencies installed later (a conflicts/not dependency cannot be honored without this DB) Installer Channel Support: * channel XSD is available on pearweb * add channel.listAll and channel.update to default PEAR protocols * add ability to &quot;pear channel-update channelname&quot; to retrieve updates manually for individual channels * fix channel.xml generation to use a valid schema declaration Installer: * with --remoteconfig option, it is possible to remotely install and uninstall packages to an FTP server. It works by mirroring a local installation, and requires a special, separate local install. * Channels implemented * Bug #1242: array-to-string conversion * fix Bug #2189 upgrade-all stops if dependancy fails * fix Bug #1637 The use of interface causes warnings when packaging with PEAR * fix Bug #1420 Parser bug for T_DOUBLE_COLON * fix Request #2220 pear5 build fails on dual php4/php5 system * Major bug in Registry - false file conflicts on data/doc/test role was possible (and would happen if HTML_Template_IT was installed and HTML_Template_Flexy installation was attempted) </notes> <provides type="class" name="OS_Guess"/> <provides type="class" name="System"/> <provides type="function" name="md5_file"/> <deps> <dep type="php" rel="ge" version="4.2"/> <dep type="pkg" rel="ge" version="1.3.2">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.0.4">XML_RPC</dep> <dep type="pkg" rel="ge" version="1.3.0RC1" optional="yes">Net_FTP</dep> <dep type="ext" rel="has">xml</dep> <dep type="ext" rel="has">pcre</dep> </deps> <filelist> <dir name="OS"> <file role="php" name="Guess.php"/> </dir> <dir name="PEAR"> <file role="php" name="Autoloader.php"/> <file role="php" name="Command.php"/> <dir name="ChannelFile"> <file name="Parser.php" role="php" /> </dir> <dir name="Command"> <file role="php" name="Auth.php"/> <file role="php" name="Build.php"/> <file role="php" name="Channels.php"/> <file role="php" name="Common.php"/> <file role="php" name="Config.php"/> <file role="php" name="Install.php"/> <file role="php" name="Package.php"/> <file role="php" name="Registry.php"/> <file role="php" name="Remote.php"/> <file role="php" name="Mirror.php"/> </dir> <dir name="Downloader"> <file role="php" name="Package.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> </dir> <dir name="Frontend"> <file role="php" name="CLI.php"/> </dir> <dir name="Installer"> <dir name="Role"> <file role="php" name="Common.php"/> <file role="php" name="Data.php"/> <file role="php" name="Doc.php"/> <file role="php" name="Ext.php"/> <file role="php" name="Php.php"/> <file role="php" name="Script.php"/> <file role="php" name="Test.php"/> </dir> <file role="php" name="Role.php"/> </dir> <dir name="PackageFile"> <dir name="Generator"> <file role="php" name="v1.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> <file role="php" name="v2.php"/> </dir> <dir name="Parser"> <file role="php" name="v1.php"/> <file role="php" name="v2.php"/> </dir> <dir name="v2"> <file role="php" name="Validator.php"/> </dir> <file role="php" name="v1.php"/> <file role="php" name="v2.php"/> </dir> <dir name="Task"> <file role="php" name="Common.php"/> <file role="php" name="Preinstallscript.php"/> <file role="php" name="Postinstallscript.php"/> <file role="php" name="Replace.php"/> </dir> <file role="php" name="ChannelFile.php"/> <file role="php" name="Common.php"/> <file role="php" name="Config.php"/> <file role="php" name="Dependency.php"/> <file role="php" name="DependencyDB.php"/> <file role="php" name="Dependency2.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> <file role="php" name="Downloader.php"/> <file role="php" name="ErrorStack.php"/> <file role="php" name="Builder.php"/> <file role="php" name="Frontend.php" /> <file role="php" name="FTP.php" /> <file role="php" name="Installer.php"/> <file role="php" name="Packager.php"/> <file role="php" name="PackageFile.php"> <replace from="@PEAR-VER@" to="version" type="package-info"/> </file> <file role="php" name="Registry.php"/> <file role="php" name="Remote.php"/> <file role="php" name="RunTest.php"/> <file role="php" name="Validate.php"/> <file role="php" name="XMLParser.php"/> </dir> <dir name="scripts" baseinstalldir="/"> <file role="script" install-as="pear" name="pear.sh" platform="!windows"> <replace from="@php_bin@" to="php_bin" type="pear-config"/> <replace from="@php_dir@" to="php_dir" type="pear-config"/> <replace from="@pear_version@" to="version" type="package-info"/> <replace from="@include_path@" to="php_dir" type="pear-config"/> </file> <file role="script" platform="windows" install-as="pear.bat" name="pear.bat"> <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> <replace from="@php_bin@" to="php_bin" type="pear-config"/> <replace from="@include_path@" to="php_dir" type="pear-config"/> </file> <file role="php" install-as="pearcmd.php" name="pearcmd.php"> <replace from="@php_bin@" to="php_bin" type="pear-config"/> <replace from="@php_dir@" to="php_dir" type="pear-config"/> <replace from="@pear_version@" to="version" type="package-info"/> <replace from="@include_path@" to="php_dir" type="pear-config"/> </file> </dir> <file role="data" name="package.dtd"/> <file role="data" name="pearchannel.xml"/> <file role="data" name="template.spec"/> <file role="php" name="PEAR.php"/> <file role="php" name="System.php"/> </filelist> </release> <changelog> <release> <version>1.3.3</version> <date>2004-10-28</date> <state>stable</state> <notes> Installer: * fix Bug #1186 raise a notice error on PEAR::Common $_packageName * fix Bug #1249 display the right state when using --force option * fix Bug #2189 upgrade-all stops if dependancy fails * fix Bug #1637 The use of interface causes warnings when packaging with PEAR * fix Bug #1420 Parser bug for T_DOUBLE_COLON * fix Request #2220 pear5 build fails on dual php4/php5 system * fix Bug #1163 pear makerpm fails with packages that supply role="doc" Other: * add PEAR_Exception class for PHP5 users * fix critical problem in package.xml for linux in 1.3.2 * fix staticPopCallback() in PEAR_ErrorStack * fix warning in PEAR_Registry for windows 98 users </notes> </release> </changelog> </package> http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/packagefiles/package2.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/packagefiles/package2.xml +++ pear-core/tests/PEAR_Command_Registry/list/packagefiles/package2.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 and installing packages * the alpha-quality PEAR_Exception PHP5 error handling mechanism * the beta-quality PEAR_ErrorStack advanced error handling mechanism * the PEAR_Error error handling mechanism * the OS_Guess class for retrieving info about the OS where PHP is running on * the System class for quick handling of common operations with files and directories * the PEAR base class </description> <lead> <name>Stig Bakken</name> <user>ssb</user> <email>stig@php.net</email> <active>yes</active> </lead> <lead> <name>Tomas V.V.Cox</name> <user>cox</user> <email>cox@idecnet.com</email> <active>yes</active> </lead> <lead> <name>Pierre-Alain Joye</name> <user>pajoye</user> <email>pajoye@pearfr.org</email> <active>yes</active> </lead> <lead> <name>Greg Beaver</name> <user>cellog</user> <email>cellog@php.net</email> <active>yes</active> </lead> <developer> <name>Martin Jansen</name> <user>mj</user> <email>mj@php.net</email> <active>yes</active> </developer> <date>2004-09-30</date> <version> <release>1.4.0a1</release> <api>1.4.0</api> </version> <stability> <release>alpha</release> <api>alpha</api> </stability> <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes>Installer Roles/Tasks: * package.xml 2.0 uses a command pattern, allowing extensibility * implement the replace, postinstallscript, and preinstallscript tasks Installer Dependency Support: * package.xml 2.0 has continued to improve and evolve * Downloader/Package.php is now used to coordinate downloading. Old code has not yet been deleted, as error handling is crappy right now. Uninstall ordering is broken, and needs to be redone. * Pre-download dependency resolution works, mostly. * There is no way to disable dependency resolution at the moment, this will be done. * Dependency2.php is used by the new PEAR_Downloader_Channel to resolve dependencies and include downloaded files in the calculations. * DependencyDB.php is used to resolve complex dependencies between installed packages and any dependencies installed later (a conflicts/not dependency cannot be honored without this DB) Installer Channel Support: * channel XSD is available on pearweb * add channel.listAll and channel.update to default PEAR protocols * add ability to &quot;pear channel-update channelname&quot; to retrieve updates manually for individual channels * fix channel.xml generation to use a valid schema declaration Installer: * with --remoteconfig option, it is possible to remotely install and uninstall packages to an FTP server. It works by mirroring a local installation, and requires a special, separate local install. * Channels implemented * Bug #1242: array-to-string conversion * fix Bug #2189 upgrade-all stops if dependancy fails * fix Bug #1637 The use of interface causes warnings when packaging with PEAR * fix Bug #1420 Parser bug for T_DOUBLE_COLON * fix Request #2220 pear5 build fails on dual php4/php5 system * Major bug in Registry - false file conflicts on data/doc/test role was possible (and would happen if HTML_Template_IT was installed and HTML_Template_Flexy installation was attempted) </notes> <contents> <dir name="/"> <dir name="OS"> <file name="Guess.php" role="php" /> </dir> <!-- /OS --> <dir name="PEAR"> <dir name="ChannelFile"> <file name="Parser.php" role="php" /> </dir> <!-- /PEAR/ChannelFile --> <dir name="Command"> <file name="Auth.php" role="php" /> <file name="Build.php" role="php" /> <file name="Channels.php" role="php" /> <file name="Common.php" role="php" /> <file name="Config.php" role="php" /> <file name="Install.php" role="php" /> <file name="Mirror.php" role="php" /> <file name="Package.php" role="php" /> <file name="Registry.php" role="php" /> <file name="Remote.php" role="php" /> </dir> <!-- /PEAR/Command --> <dir name="Downloader"> <file name="Package.php" role="php"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> </file> </dir> <!-- /PEAR/Downloader --> <dir name="Frontend"> <file name="CLI.php" role="php" /> </dir> <!-- /PEAR/Frontend --> <dir name="Installer"> <dir name="Role"> <file name="Common.php" role="php" /> <file name="Data.php" role="php" /> <file name="Doc.php" role="php" /> <file name="Ext.php" role="php" /> <file name="Php.php" role="php" /> <file name="Script.php" role="php" /> <file name="Test.php" role="php" /> </dir> <!-- /PEAR/Installer/Role --> <file name="Role.php" role="php" /> </dir> <!-- /PEAR/Installer --> <dir name="PackageFile"> <dir name="Generator"> <file name="v1.php" role="php"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> </file> <file name="v2.php" role="php" /> </dir> <!-- /PEAR/PackageFile/Generator --> <dir name="Parser"> <file name="v1.php" role="php" /> <file name="v2.php" role="php" /> </dir> <!-- /PEAR/PackageFile/Parser --> <dir name="v2"> <file role="php" name="Validator.php"/> </dir> <!-- /PEAR/PackageFile/v2 --> <file name="v1.php" role="php" /> <file name="v2.php" role="php" /> </dir> <!-- /PEAR/PackageFile --> <dir name="Task"> <file name="Common.php" role="php" /> <file name="Preinstallscript.php" role="php" /> <file name="Postinstallscript.php" role="php" /> <file name="Replace.php" role="php" /> </dir> <!-- /PEAR/Task --> <file name="Autoloader.php" role="php" /> <file name="Builder.php" role="php" /> <file name="ChannelFile.php" role="php" /> <file name="Command.php" role="php" /> <file name="Common.php" role="php" /> <file name="Config.php" role="php" /> <file name="Dependency.php" role="php" /> <file name="DependencyDB.php" role="php" /> <file name="Dependency2.php" role="php"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> </file> <file name="Downloader.php" role="php" /> <file name="ErrorStack.php" role="php" /> <file name="Frontend.php" role="php" /> <file name="FTP.php" role="php" /> <file name="Installer.php" role="php" /> <file name="PackageFile.php" role="php"> <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> </file> <file name="Packager.php" role="php" /> <file name="Registry.php" role="php" /> <file name="Remote.php" role="php" /> <file name="RunTest.php" role="php" /> <file name="Validate.php" role="php" /> <file name="XMLParser.php" role="php" /> </dir> <!-- /PEAR --> <dir name="scripts" baseinstalldir="/"> <file name="pear.bat" role="script"> <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> </file> <file name="pear.sh" role="script"> <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> <tasks:replace from="@pear_version@" to="version" type="package-info" /> <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> </file> <file name="pearcmd.php" role="php"> <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> <tasks:replace from="@pear_version@" to="version" type="package-info" /> <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> </file> </dir> <!-- /scripts --> <file name="package.dtd" role="data" /> <file name="PEAR.php" role="php" /> <file name="pearchannel.xml" role="data" /> <file name="System.php" role="php" /> <file name="template.spec" role="data" /> </dir> <!-- / --> </contents> <dependencies> <required> <php> <min>4.2</min> <max>6.0.0</max> </php> <pearinstaller> <min>1.4.0dev13</min> </pearinstaller> <package> <name>Archive_Tar</name> <channel>pear.php.net</channel> <min>1.1</min> </package> <package> <name>Console_Getopt</name> <channel>pear.php.net</channel> <min>1.2</min> </package> <package> <name>XML_RPC</name> <channel>pear.php.net</channel> <min>1.0.4</min> </package> <extension> <name>xml</name> <channel>pear.php.net</channel> </extension> <extension> <name>pcre</name> <channel>pear.php.net</channel> </extension> </required> <group name="remoteinstall" hint="adds the ability to install packages to a remote ftp server"> <package> <name>Net_FTP</name> <channel>pear.php.net</channel> <min>1.3.0RC1</min> </package> </group> </dependencies> <phprelease> <installconditions> <os> <name>windows</name> </os> </installconditions> <filelist> <install as="pear.bat" name="scripts/pear.bat" /> <install as="pearcmd.php" name="scripts/pearcmd.php" /> <ignore name="scripts/pear.sh" /> </filelist> </phprelease> <phprelease> <filelist> <install as="pear" name="scripts/pear.sh" /> <install as="pearcmd.php" name="scripts/pearcmd.php" /> <ignore name="scripts/pear.bat" /> </filelist> </phprelease> <changelog> <release> <version> <release>1.3.3</release> <api>1.3.0</api> </version> <stability> <release>stable</release> <api>stable</api> </stability> <date>2004-10-28</date> <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes>Installer: * fix Bug #1186 raise a notice error on PEAR::Common $_packageName * fix Bug #1249 display the right state when using --force option * fix Bug #2189 upgrade-all stops if dependancy fails * fix Bug #1637 The use of interface causes warnings when packaging with PEAR * fix Bug #1420 Parser bug for T_DOUBLE_COLON * fix Request #2220 pear5 build fails on dual php4/php5 system * fix Bug #1163 pear makerpm fails with packages that supply role="doc" Other: * add PEAR_Exception class for PHP5 users * fix critical problem in package.xml for linux in 1.3.2 * fix staticPopCallback() in PEAR_ErrorStack * fix warning in PEAR_Registry for windows 98 users </notes> </release> </changelog> </package> http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_allchannels.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_allchannels.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_allchannels.phpt --TEST-- list command, --allchannels opt --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'; $e = $command->run('list', array('allchannels' => true), array()); $phpunit->showall(); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Installed packages, channel pear.php.net:', 'border' => true, 'data' => array ( 0 => array ( 0 => '(no packages installed)', ), ), ), 'cmd' => 'list', ), 1 => array ( 'info' => array ( 'caption' => 'Installed packages, channel __uri:', 'border' => true, 'data' => array ( 0 => array ( 0 => '(no packages installed)', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'no packages installed'); $reg = &$config->getRegistry(); $pkg = &new PEAR_PackageFile($config); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package2.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); require_once 'PEAR/ChannelFile.php'; $ch = new PEAR_ChannelFile; $ch->setName('gronk'); $ch->setServer('gronk'); $ch->setSummary('gronk'); $reg->addChannel($ch); $info->setChannel('gronk'); $reg->addPackage2($info); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package-Console_Getopt.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); $e = $command->run('list', array('allchannels' => true), array()); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Installed packages, channel gronk:', 'border' => true, 'headline' => array ( 0 => 'Package', 1 => 'Version', 2 => 'State', ), 'data' => array ( 0 => array ( 0 => 'PEAR', 1 => '1.4.0a1', 2 => 'alpha', ), ), ), 'cmd' => 'list', ), 1 => array ( 'info' => array ( 'caption' => 'Installed packages, channel pear.php.net:', 'border' => true, 'headline' => array ( 0 => 'Package', 1 => 'Version', 2 => 'State', ), 'data' => array ( 0 => array ( 0 => 'Console_Getopt', 1 => '1.2', 2 => 'stable', ), 1 => array ( 0 => 'PEAR', 1 => '1.4.0a1', 2 => 'alpha', ), ), ), 'cmd' => 'list', ), 2 => array ( 'info' => array ( 'caption' => 'Installed packages, channel __uri:', 'border' => true, 'data' => array ( 0 => array ( 0 => '(no packages installed)', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'installed'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_default_channel.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_default_channel.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_default_channel.phpt --TEST-- list command, default_channel usage --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'; $reg = &$config->getRegistry(); $ch = new PEAR_ChannelFile; $ch->setName('gronk'); $ch->setServer('gronk'); $ch->setSummary('gronk'); $reg->addChannel($ch); $config->set('default_channel', 'gronk'); $e = $command->run('list', array(), array()); $phpunit->showall(); $phpunit->assertEquals(array ( 0 => array ( 'info' => '(no packages installed from channel gronk)', 'cmd' => 'list', ), ), $fakelog->getLog(), 'no packages installed'); $pkg = &new PEAR_PackageFile($config); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package2.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); require_once 'PEAR/ChannelFile.php'; $ch = new PEAR_ChannelFile; $ch->setName('gronk'); $ch->setServer('gronk'); $ch->setSummary('gronk'); $reg->addChannel($ch); $info->setChannel('gronk'); $reg->addPackage2($info); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package-Console_Getopt.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); $e = $command->run('list', array(), array()); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Installed packages, channel gronk:', 'border' => true, 'headline' => array ( 0 => 'Package', 1 => 'Version', 2 => 'State', ), 'data' => array ( 0 => array ( 0 => 'PEAR', 1 => '1.4.0a1', 2 => 'alpha', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'installed');echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_fail.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_fail.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_fail.phpt --TEST-- list command failure --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'; $e = $command->run('list', array('channel' => 'gronk'), array()); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => 'Channel "gronk" does not exist'), ), 'unknown channel as option'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_fail_list-files.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_fail_list-files.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_fail_list-files.phpt --TEST-- list command, pseudo-list-files, failure --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'; $e = $command->run('list', array(), array('gronk')); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => '`gronk\' not installed'), ), 'unknown layer'); $e = $command->run('list', array(), array('gronk/php_dir')); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => 'unknown channel "gronk" in "gronk/php_dir"'), array('package' => 'PEAR_Error', 'message' => 'unknown channel "gronk" in "gronk/php_dir"'), ), 'unknown channel as option'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_installed.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_installed.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_installed.phpt --TEST-- list command, pseudo-list-files, installed package --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'; $reg = $config->getRegistry(); $pkg = &new PEAR_PackageFile($config); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package2.xml', PEAR_VALIDATE_NORMAL); foreach ($info->getFilelist() as $file => $atts) { $info->setInstalledAs($file, 1 . $file); } $reg->addPackage2($info); $e = $command->run('list', array(), array('PEAR')); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Installed Files For PEAR', 'border' => true, 'headline' => array ( 0 => 'Type', 1 => 'Install Path', ), 'data' => array ( 0 => array ( 0 => 'php', 1 => '1OS/Guess.php', ), 1 => array ( 0 => 'php', 1 => '1PEAR/ChannelFile/Parser.php', ), 2 => array ( 0 => 'php', 1 => '1PEAR/Command/Auth.php', ), 3 => array ( 0 => 'php', 1 => '1PEAR/Command/Build.php', ), 4 => array ( 0 => 'php', 1 => '1PEAR/Command/Channels.php', ), 5 => array ( 0 => 'php', 1 => '1PEAR/Command/Common.php', ), 6 => array ( 0 => 'php', 1 => '1PEAR/Command/Config.php', ), 7 => array ( 0 => 'php', 1 => '1PEAR/Command/Install.php', ), 8 => array ( 0 => 'php', 1 => '1PEAR/Command/Mirror.php', ), 9 => array ( 0 => 'php', 1 => '1PEAR/Command/Package.php', ), 10 => array ( 0 => 'php', 1 => '1PEAR/Command/Registry.php', ), 11 => array ( 0 => 'php', 1 => '1PEAR/Command/Remote.php', ), 12 => array ( 0 => 'php', 1 => '1PEAR/Downloader/Package.php', ), 13 => array ( 0 => 'php', 1 => '1PEAR/Frontend/CLI.php', ), 14 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role/Common.php', ), 15 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role/Data.php', ), 16 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role/Doc.php', ), 17 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role/Ext.php', ), 18 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role/Php.php', ), 19 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role/Script.php', ), 20 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role/Test.php', ), 21 => array ( 0 => 'php', 1 => '1PEAR/Installer/Role.php', ), 22 => array ( 0 => 'php', 1 => '1PEAR/PackageFile/Generator/v1.php', ), 23 => array ( 0 => 'php', 1 => '1PEAR/PackageFile/Generator/v2.php', ), 24 => array ( 0 => 'php', 1 => '1PEAR/PackageFile/Parser/v1.php', ), 25 => array ( 0 => 'php', 1 => '1PEAR/PackageFile/Parser/v2.php', ), 26 => array ( 0 => 'php', 1 => '1PEAR/PackageFile/v2/Validator.php', ), 27 => array ( 0 => 'php', 1 => '1PEAR/PackageFile/v1.php', ), 28 => array ( 0 => 'php', 1 => '1PEAR/PackageFile/v2.php', ), 29 => array ( 0 => 'php', 1 => '1PEAR/Task/Common.php', ), 30 => array ( 0 => 'php', 1 => '1PEAR/Task/Preinstallscript.php', ), 31 => array ( 0 => 'php', 1 => '1PEAR/Task/Postinstallscript.php', ), 32 => array ( 0 => 'php', 1 => '1PEAR/Task/Replace.php', ), 33 => array ( 0 => 'php', 1 => '1PEAR/Autoloader.php', ), 34 => array ( 0 => 'php', 1 => '1PEAR/Builder.php', ), 35 => array ( 0 => 'php', 1 => '1PEAR/ChannelFile.php', ), 36 => array ( 0 => 'php', 1 => '1PEAR/Command.php', ), 37 => array ( 0 => 'php', 1 => '1PEAR/Common.php', ), 38 => array ( 0 => 'php', 1 => '1PEAR/Config.php', ), 39 => array ( 0 => 'php', 1 => '1PEAR/Dependency.php', ), 40 => array ( 0 => 'php', 1 => '1PEAR/DependencyDB.php', ), 41 => array ( 0 => 'php', 1 => '1PEAR/Dependency2.php', ), 42 => array ( 0 => 'php', 1 => '1PEAR/Downloader.php', ), 43 => array ( 0 => 'php', 1 => '1PEAR/ErrorStack.php', ), 44 => array ( 0 => 'php', 1 => '1PEAR/Frontend.php', ), 45 => array ( 0 => 'php', 1 => '1PEAR/FTP.php', ), 46 => array ( 0 => 'php', 1 => '1PEAR/Installer.php', ), 47 => array ( 0 => 'php', 1 => '1PEAR/PackageFile.php', ), 48 => array ( 0 => 'php', 1 => '1PEAR/Packager.php', ), 49 => array ( 0 => 'php', 1 => '1PEAR/Registry.php', ), 50 => array ( 0 => 'php', 1 => '1PEAR/Remote.php', ), 51 => array ( 0 => 'php', 1 => '1PEAR/RunTest.php', ), 52 => array ( 0 => 'php', 1 => '1PEAR/Validate.php', ), 53 => array ( 0 => 'php', 1 => '1PEAR/XMLParser.php', ), 54 => array ( 0 => 'script', 1 => '1scripts/pear.bat', ), 55 => array ( 0 => 'script', 1 => '1scripts/pear.sh', ), 56 => array ( 0 => 'php', 1 => '1scripts/pearcmd.php', ), 57 => array ( 0 => 'data', 1 => '1package.dtd', ), 58 => array ( 0 => 'php', 1 => '1PEAR.php', ), 59 => array ( 0 => 'data', 1 => '1pearchannel.xml', ), 60 => array ( 0 => 'php', 1 => '1System.php', ), 61 => array ( 0 => 'data', 1 => '1template.spec', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'file list'); $reg->deletePackage('PEAR'); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package.xml', PEAR_VALIDATE_NORMAL); foreach ($info->getFilelist() as $file => $atts) { $info->setInstalledAs($file, 2 . $file); } $reg->addPackage2($info); $e = $command->run('list', array(), array('PEAR')); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Installed Files For PEAR', 'border' => true, 'headline' => array ( 0 => 'Type', 1 => 'Install Path', ), 'data' => array ( 0 => array ( 0 => 'php', 1 => '2OS/Guess.php', ), 1 => array ( 0 => 'php', 1 => '2PEAR/Autoloader.php', ), 2 => array ( 0 => 'php', 1 => '2PEAR/Command.php', ), 3 => array ( 0 => 'php', 1 => '2PEAR/ChannelFile/Parser.php', ), 4 => array ( 0 => 'php', 1 => '2PEAR/Command/Auth.php', ), 5 => array ( 0 => 'php', 1 => '2PEAR/Command/Build.php', ), 6 => array ( 0 => 'php', 1 => '2PEAR/Command/Channels.php', ), 7 => array ( 0 => 'php', 1 => '2PEAR/Command/Common.php', ), 8 => array ( 0 => 'php', 1 => '2PEAR/Command/Config.php', ), 9 => array ( 0 => 'php', 1 => '2PEAR/Command/Install.php', ), 10 => array ( 0 => 'php', 1 => '2PEAR/Command/Package.php', ), 11 => array ( 0 => 'php', 1 => '2PEAR/Command/Registry.php', ), 12 => array ( 0 => 'php', 1 => '2PEAR/Command/Remote.php', ), 13 => array ( 0 => 'php', 1 => '2PEAR/Command/Mirror.php', ), 14 => array ( 0 => 'php', 1 => '2PEAR/Downloader/Package.php', ), 15 => array ( 0 => 'php', 1 => '2PEAR/Frontend/CLI.php', ), 16 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role/Common.php', ), 17 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role/Data.php', ), 18 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role/Doc.php', ), 19 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role/Ext.php', ), 20 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role/Php.php', ), 21 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role/Script.php', ), 22 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role/Test.php', ), 23 => array ( 0 => 'php', 1 => '2PEAR/Installer/Role.php', ), 24 => array ( 0 => 'php', 1 => '2PEAR/PackageFile/Generator/v1.php', ), 25 => array ( 0 => 'php', 1 => '2PEAR/PackageFile/Generator/v2.php', ), 26 => array ( 0 => 'php', 1 => '2PEAR/PackageFile/Parser/v1.php', ), 27 => array ( 0 => 'php', 1 => '2PEAR/PackageFile/Parser/v2.php', ), 28 => array ( 0 => 'php', 1 => '2PEAR/PackageFile/v2/Validator.php', ), 29 => array ( 0 => 'php', 1 => '2PEAR/PackageFile/v1.php', ), 30 => array ( 0 => 'php', 1 => '2PEAR/PackageFile/v2.php', ), 31 => array ( 0 => 'php', 1 => '2PEAR/Task/Common.php', ), 32 => array ( 0 => 'php', 1 => '2PEAR/Task/Preinstallscript.php', ), 33 => array ( 0 => 'php', 1 => '2PEAR/Task/Postinstallscript.php', ), 34 => array ( 0 => 'php', 1 => '2PEAR/Task/Replace.php', ), 35 => array ( 0 => 'php', 1 => '2PEAR/ChannelFile.php', ), 36 => array ( 0 => 'php', 1 => '2PEAR/Common.php', ), 37 => array ( 0 => 'php', 1 => '2PEAR/Config.php', ), 38 => array ( 0 => 'php', 1 => '2PEAR/Dependency.php', ), 39 => array ( 0 => 'php', 1 => '2PEAR/DependencyDB.php', ), 40 => array ( 0 => 'php', 1 => '2PEAR/Dependency2.php', ), 41 => array ( 0 => 'php', 1 => '2PEAR/Downloader.php', ), 42 => array ( 0 => 'php', 1 => '2PEAR/ErrorStack.php', ), 43 => array ( 0 => 'php', 1 => '2PEAR/Builder.php', ), 44 => array ( 0 => 'php', 1 => '2PEAR/Frontend.php', ), 45 => array ( 0 => 'php', 1 => '2PEAR/FTP.php', ), 46 => array ( 0 => 'php', 1 => '2PEAR/Installer.php', ), 47 => array ( 0 => 'php', 1 => '2PEAR/Packager.php', ), 48 => array ( 0 => 'php', 1 => '2PEAR/PackageFile.php', ), 49 => array ( 0 => 'php', 1 => '2PEAR/Registry.php', ), 50 => array ( 0 => 'php', 1 => '2PEAR/Remote.php', ), 51 => array ( 0 => 'php', 1 => '2PEAR/RunTest.php', ), 52 => array ( 0 => 'php', 1 => '2PEAR/Validate.php', ), 53 => array ( 0 => 'php', 1 => '2PEAR/XMLParser.php', ), 54 => array ( 0 => 'script', 1 => '2scripts/pear.sh', ), 55 => array ( 0 => 'script', 1 => '2scripts/pear.bat', ), 56 => array ( 0 => 'php', 1 => '2scripts/pearcmd.php', ), 57 => array ( 0 => 'data', 1 => '2package.dtd', ), 58 => array ( 0 => 'data', 1 => '2pearchannel.xml', ), 59 => array ( 0 => 'data', 1 => '2template.spec', ), 60 => array ( 0 => 'php', 1 => '2PEAR.php', ), 61 => array ( 0 => 'php', 1 => '2System.php', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'file list 2'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_normal.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_normal.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_normal.phpt --TEST-- list command, normal usage --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'; $e = $command->run('list', array(), array()); $phpunit->assertEquals(array ( 0 => array ( 'info' => '(no packages installed from channel pear.php.net)', 'cmd' => 'list', ), ), $fakelog->getLog(), 'no packages installed'); $reg = &$config->getRegistry(); $pkg = &new PEAR_PackageFile($config); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package2.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); require_once 'PEAR/ChannelFile.php'; $ch = new PEAR_ChannelFile; $ch->setName('gronk'); $ch->setServer('gronk'); $ch->setSummary('gronk'); $reg->addChannel($ch); $info->setChannel('gronk'); $reg->addPackage2($info); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package-Console_Getopt.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); $e = $command->run('list', array(), array()); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Installed packages, channel pear.php.net:', 'border' => true, 'headline' => array ( 0 => 'Package', 1 => 'Version', 2 => 'State', ), 'data' => array ( 0 => array ( 0 => 'Console_Getopt', 1 => '1.2', 2 => 'stable', ), 1 => array ( 0 => 'PEAR', 1 => '1.4.0a1', 2 => 'alpha', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'installed'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_notinstalled.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_notinstalled.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_notinstalled.phpt --TEST-- list command, pseudo-list-files, package not installed --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'; $e = $command->run('list', array(), array(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package2.xml')); $phpunit->showall(); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Contents of package2.xml', 'border' => true, 'headline' => array ( 0 => 'Package File', 1 => 'Install Path', ), 'data' => array ( 0 => array ( 0 => 'OS/Guess.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'OS' . DIRECTORY_SEPARATOR . 'Guess.php', ), 1 => array ( 0 => 'PEAR/ChannelFile/Parser.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'ChannelFile' . DIRECTORY_SEPARATOR . 'Parser.php', ), 2 => array ( 0 => 'PEAR/Command/Auth.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Auth.php', ), 3 => array ( 0 => 'PEAR/Command/Build.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Build.php', ), 4 => array ( 0 => 'PEAR/Command/Channels.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Channels.php', ), 5 => array ( 0 => 'PEAR/Command/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Common.php', ), 6 => array ( 0 => 'PEAR/Command/Config.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Config.php', ), 7 => array ( 0 => 'PEAR/Command/Install.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Install.php', ), 8 => array ( 0 => 'PEAR/Command/Mirror.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Mirror.php', ), 9 => array ( 0 => 'PEAR/Command/Package.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Package.php', ), 10 => array ( 0 => 'PEAR/Command/Registry.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Registry.php', ), 11 => array ( 0 => 'PEAR/Command/Remote.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Remote.php', ), 12 => array ( 0 => 'PEAR/Downloader/Package.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Downloader' . DIRECTORY_SEPARATOR . 'Package.php', ), 13 => array ( 0 => 'PEAR/Frontend/CLI.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Frontend' . DIRECTORY_SEPARATOR . 'CLI.php', ), 14 => array ( 0 => 'PEAR/Installer/Role/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Common.php', ), 15 => array ( 0 => 'PEAR/Installer/Role/Data.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Data.php', ), 16 => array ( 0 => 'PEAR/Installer/Role/Doc.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Doc.php', ), 17 => array ( 0 => 'PEAR/Installer/Role/Ext.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Ext.php', ), 18 => array ( 0 => 'PEAR/Installer/Role/Php.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Php.php', ), 19 => array ( 0 => 'PEAR/Installer/Role/Script.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Script.php', ), 20 => array ( 0 => 'PEAR/Installer/Role/Test.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Test.php', ), 21 => array ( 0 => 'PEAR/Installer/Role.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role.php', ), 22 => array ( 0 => 'PEAR/PackageFile/Generator/v1.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . 'v1.php', ), 23 => array ( 0 => 'PEAR/PackageFile/Generator/v2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . 'v2.php', ), 24 => array ( 0 => 'PEAR/PackageFile/Parser/v1.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Parser' . DIRECTORY_SEPARATOR . 'v1.php', ), 25 => array ( 0 => 'PEAR/PackageFile/Parser/v2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Parser' . DIRECTORY_SEPARATOR . 'v2.php', ), 26 => array ( 0 => 'PEAR/PackageFile/v2/Validator.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'v2' . DIRECTORY_SEPARATOR . 'Validator.php', ), 27 => array ( 0 => 'PEAR/PackageFile/v1.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'v1.php', ), 28 => array ( 0 => 'PEAR/PackageFile/v2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'v2.php', ), 29 => array ( 0 => 'PEAR/Task/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Common.php', ), 30 => array ( 0 => 'PEAR/Task/Preinstallscript.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Preinstallscript.php', ), 31 => array ( 0 => 'PEAR/Task/Postinstallscript.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Postinstallscript.php', ), 32 => array ( 0 => 'PEAR/Task/Replace.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Replace.php', ), 33 => array ( 0 => 'PEAR/Autoloader.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Autoloader.php', ), 34 => array ( 0 => 'PEAR/Builder.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Builder.php', ), 35 => array ( 0 => 'PEAR/ChannelFile.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'ChannelFile.php', ), 36 => array ( 0 => 'PEAR/Command.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command.php', ), 37 => array ( 0 => 'PEAR/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Common.php', ), 38 => array ( 0 => 'PEAR/Config.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Config.php', ), 39 => array ( 0 => 'PEAR/Dependency.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Dependency.php', ), 40 => array ( 0 => 'PEAR/DependencyDB.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'DependencyDB.php', ), 41 => array ( 0 => 'PEAR/Dependency2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Dependency2.php', ), 42 => array ( 0 => 'PEAR/Downloader.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Downloader.php', ), 43 => array ( 0 => 'PEAR/ErrorStack.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'ErrorStack.php', ), 44 => array ( 0 => 'PEAR/Frontend.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Frontend.php', ), 45 => array ( 0 => 'PEAR/FTP.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'FTP.php', ), 46 => array ( 0 => 'PEAR/Installer.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer.php', ), 47 => array ( 0 => 'PEAR/PackageFile.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile.php', ), 48 => array ( 0 => 'PEAR/Packager.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Packager.php', ), 49 => array ( 0 => 'PEAR/Registry.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Registry.php', ), 50 => array ( 0 => 'PEAR/Remote.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Remote.php', ), 51 => array ( 0 => 'PEAR/RunTest.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'RunTest.php', ), 52 => array ( 0 => 'PEAR/Validate.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Validate.php', ), 53 => array ( 0 => 'PEAR/XMLParser.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'XMLParser.php', ), 54 => array ( 0 => 'scripts/pear.bat', 1 => $temp_path . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'pear.bat', ), 55 => array ( 0 => 'scripts/pear.sh', 1 => $temp_path . DIRECTORY_SEPARATOR . 'bin' . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'pear.sh', ), 56 => array ( 0 => 'scripts/pearcmd.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'pearcmd.php', ), 57 => array ( 0 => 'package.dtd', 1 => $temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'package.dtd', ), 58 => array ( 0 => 'PEAR.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR.php', ), 59 => array ( 0 => 'pearchannel.xml', 1 => $temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'pearchannel.xml', ), 60 => array ( 0 => 'System.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'System.php', ), 61 => array ( 0 => 'template.spec', 1 => $temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'template.spec', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'package2.xml'); $e = $command->run('list', array(), array(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package.xml')); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Contents of package.xml', 'border' => true, 'headline' => array ( 0 => 'Package File', 1 => 'Install Path', ), 'data' => array ( 0 => array ( 0 => 'OS/Guess.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'OS' . DIRECTORY_SEPARATOR . 'Guess.php', ), 1 => array ( 0 => 'PEAR/Autoloader.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Autoloader.php', ), 2 => array ( 0 => 'PEAR/Command.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command.php', ), 3 => array ( 0 => 'PEAR/ChannelFile/Parser.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'ChannelFile' . DIRECTORY_SEPARATOR . 'Parser.php', ), 4 => array ( 0 => 'PEAR/Command/Auth.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Auth.php', ), 5 => array ( 0 => 'PEAR/Command/Build.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Build.php', ), 6 => array ( 0 => 'PEAR/Command/Channels.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Channels.php', ), 7 => array ( 0 => 'PEAR/Command/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Common.php', ), 8 => array ( 0 => 'PEAR/Command/Config.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Config.php', ), 9 => array ( 0 => 'PEAR/Command/Install.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Install.php', ), 10 => array ( 0 => 'PEAR/Command/Package.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Package.php', ), 11 => array ( 0 => 'PEAR/Command/Registry.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Registry.php', ), 12 => array ( 0 => 'PEAR/Command/Remote.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Remote.php', ), 13 => array ( 0 => 'PEAR/Command/Mirror.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Command' . DIRECTORY_SEPARATOR . 'Mirror.php', ), 14 => array ( 0 => 'PEAR/Downloader/Package.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Downloader' . DIRECTORY_SEPARATOR . 'Package.php', ), 15 => array ( 0 => 'PEAR/Frontend/CLI.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Frontend' . DIRECTORY_SEPARATOR . 'CLI.php', ), 16 => array ( 0 => 'PEAR/Installer/Role/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Common.php', ), 17 => array ( 0 => 'PEAR/Installer/Role/Data.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Data.php', ), 18 => array ( 0 => 'PEAR/Installer/Role/Doc.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Doc.php', ), 19 => array ( 0 => 'PEAR/Installer/Role/Ext.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Ext.php', ), 20 => array ( 0 => 'PEAR/Installer/Role/Php.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Php.php', ), 21 => array ( 0 => 'PEAR/Installer/Role/Script.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Script.php', ), 22 => array ( 0 => 'PEAR/Installer/Role/Test.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role' . DIRECTORY_SEPARATOR . 'Test.php', ), 23 => array ( 0 => 'PEAR/Installer/Role.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer' . DIRECTORY_SEPARATOR . 'Role.php', ), 24 => array ( 0 => 'PEAR/PackageFile/Generator/v1.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . 'v1.php', ), 25 => array ( 0 => 'PEAR/PackageFile/Generator/v2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR . 'v2.php', ), 26 => array ( 0 => 'PEAR/PackageFile/Parser/v1.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Parser' . DIRECTORY_SEPARATOR . 'v1.php', ), 27 => array ( 0 => 'PEAR/PackageFile/Parser/v2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'Parser' . DIRECTORY_SEPARATOR . 'v2.php', ), 28 => array ( 0 => 'PEAR/PackageFile/v2/Validator.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'v2' . DIRECTORY_SEPARATOR . 'Validator.php', ), 29 => array ( 0 => 'PEAR/PackageFile/v1.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'v1.php', ), 30 => array ( 0 => 'PEAR/PackageFile/v2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile' . DIRECTORY_SEPARATOR . 'v2.php', ), 31 => array ( 0 => 'PEAR/Task/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Common.php', ), 32 => array ( 0 => 'PEAR/Task/Preinstallscript.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Preinstallscript.php', ), 33 => array ( 0 => 'PEAR/Task/Postinstallscript.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Postinstallscript.php', ), 34 => array ( 0 => 'PEAR/Task/Replace.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Task' . DIRECTORY_SEPARATOR . 'Replace.php', ), 35 => array ( 0 => 'PEAR/ChannelFile.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'ChannelFile.php', ), 36 => array ( 0 => 'PEAR/Common.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Common.php', ), 37 => array ( 0 => 'PEAR/Config.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Config.php', ), 38 => array ( 0 => 'PEAR/Dependency.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Dependency.php', ), 39 => array ( 0 => 'PEAR/DependencyDB.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'DependencyDB.php', ), 40 => array ( 0 => 'PEAR/Dependency2.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Dependency2.php', ), 41 => array ( 0 => 'PEAR/Downloader.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Downloader.php', ), 42 => array ( 0 => 'PEAR/ErrorStack.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'ErrorStack.php', ), 43 => array ( 0 => 'PEAR/Builder.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Builder.php', ), 44 => array ( 0 => 'PEAR/Frontend.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Frontend.php', ), 45 => array ( 0 => 'PEAR/FTP.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'FTP.php', ), 46 => array ( 0 => 'PEAR/Installer.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Installer.php', ), 47 => array ( 0 => 'PEAR/Packager.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Packager.php', ), 48 => array ( 0 => 'PEAR/PackageFile.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'PackageFile.php', ), 49 => array ( 0 => 'PEAR/Registry.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Registry.php', ), 50 => array ( 0 => 'PEAR/Remote.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Remote.php', ), 51 => array ( 0 => 'PEAR/RunTest.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'RunTest.php', ), 52 => array ( 0 => 'PEAR/Validate.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'Validate.php', ), 53 => array ( 0 => 'PEAR/XMLParser.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'XMLParser.php', ), 54 => array ( 0 => 'scripts/pear.sh', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'pear.sh', ), 55 => array ( 0 => 'scripts/pear.bat', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'pear.bat', ), 56 => array ( 0 => 'scripts/pearcmd.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'pearcmd.php', ), 57 => array ( 0 => 'package.dtd', 1 => $temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'package.dtd', ), 58 => array ( 0 => 'pearchannel.xml', 1 => $temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'pearchannel.xml', ), 59 => array ( 0 => 'template.spec', 1 => $temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'PEAR' . DIRECTORY_SEPARATOR . 'template.spec', ), 60 => array ( 0 => 'PEAR.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'PEAR.php', ), 61 => array ( 0 => 'System.php', 1 => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'System.php', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'package.xml'); echo 'tests done'; ?> --EXPECT-- tests done http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Registry/list/test_opt.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Registry/list/test_opt.phpt +++ pear-core/tests/PEAR_Command_Registry/list/test_opt.phpt --TEST-- list command, default_channel usage --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'; $reg = &$config->getRegistry(); $ch = new PEAR_ChannelFile; $ch->setName('gronk'); $ch->setServer('gronk'); $ch->setSummary('gronk'); $reg->addChannel($ch); $e = $command->run('list', array('channel' => 'gronk'), array()); $phpunit->showall(); $phpunit->assertEquals(array ( 0 => array ( 'info' => '(no packages installed from channel gronk)', 'cmd' => 'list', ), ), $fakelog->getLog(), 'no packages installed'); $pkg = &new PEAR_PackageFile($config); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package2.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); require_once 'PEAR/ChannelFile.php'; $ch = new PEAR_ChannelFile; $ch->setName('gronk'); $ch->setServer('gronk'); $ch->setSummary('gronk'); $reg->addChannel($ch); $info->setChannel('gronk'); $reg->addPackage2($info); $info = $pkg->fromPackageFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . 'packagefiles' . DIRECTORY_SEPARATOR . 'package-Console_Getopt.xml', PEAR_VALIDATE_NORMAL); $reg->addPackage2($info); $e = $command->run('list', array('channel' => 'gronk'), array()); $phpunit->assertEquals(array ( 0 => array ( 'info' => array ( 'caption' => 'Installed packages, channel gronk:', 'border' => true, 'headline' => array ( 0 => 'Package', 1 => 'Version', 2 => 'State', ), 'data' => array ( 0 => array ( 0 => 'PEAR', 1 => '1.4.0a1', 2 => 'alpha', ), ), ), 'cmd' => 'list', ), ), $fakelog->getLog(), 'installed'); echo 'tests done'; ?> --EXPECT-- tests done
« previous php.pear.cvs (#26567) next »