cellog Sat Sep 24 00:25:34 2005 EDT
Modified files:
/pear-core/PEAR/Command Config.php
/pear-core package-PEAR.xml
/pear-core/tests/PEAR_Command_Config/config-create test.phpt
test_windows.phpt
Log:
fix invalid PEAR_Config creation
http://cvs.php.net/diff.php/pear-core/PEAR/Command/Config.php?r1=1.47&r2=1.48&ty=u
Index: pear-core/PEAR/Command/Config.php
diff -u pear-core/PEAR/Command/Config.php:1.47
pear-core/PEAR/Command/Config.php:1.48
--- pear-core/PEAR/Command/Config.php:1.47 Wed Apr 13 00:30:11 2005
+++ pear-core/PEAR/Command/Config.php Sat Sep 24 00:25:33 2005
@@ -16,7 +16,7 @@
* @author Greg Beaver <cellog@xxxxxxx>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
- * @version CVS: $Id: Config.php,v 1.47 2005/04/13 04:30:11 cellog Exp $
+ * @version CVS: $Id: Config.php,v 1.48 2005/09/24 04:25:33 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -326,7 +326,7 @@
}
}
$params[1] = realpath($params[1]);
- $config = &new PEAR_Config($params[1], '#no#system#config#');
+ $config = &new PEAR_Config($params[1], '#no#system#config#', false,
false);
if ($root{strlen($root) - 1} == '/') {
$root = substr($root, 0, strlen($root) - 1);
}
http://cvs.php.net/diff.php/pear-core/package-PEAR.xml?r1=1.268&r2=1.269&ty=u
Index: pear-core/package-PEAR.xml
diff -u pear-core/package-PEAR.xml:1.268 pear-core/package-PEAR.xml:1.269
--- pear-core/package-PEAR.xml:1.268 Sat Sep 24 00:15:14 2005
+++ pear-core/package-PEAR.xml Sat Sep 24 00:25:34 2005
@@ -84,6 +84,7 @@
* fix cvsdiff command
* fix xml encoding issues finally
* clean up package.xml 1.0 dir/file parsing
+ * fix invalid PEAR_Config generation
* change the user agent from PHP/phpversion to
PEAR/pearversion/PHP/phpversion
* fix Bug #5323: pear search returns odd version numbers
* fix Bug #5428: pear cvstag package2.xml does not include the package.xml
http://cvs.php.net/diff.php/pear-core/tests/PEAR_Command_Config/config-create/test.phpt?r1=1.6&r2=1.7&ty=u
Index: pear-core/tests/PEAR_Command_Config/config-create/test.phpt
diff -u pear-core/tests/PEAR_Command_Config/config-create/test.phpt:1.6
pear-core/tests/PEAR_Command_Config/config-create/test.phpt:1.7
--- pear-core/tests/PEAR_Command_Config/config-create/test.phpt:1.6 Fri Feb
18 22:12:48 2005
+++ pear-core/tests/PEAR_Command_Config/config-create/test.phpt Sat Sep 24
00:25:34 2005
@@ -16,6 +16,10 @@
}
$e = $command->run('config-create', array(), array($temp_path2 . '/nomake',
$temp_path . DIRECTORY_SEPARATOR
. 'remote.ini'));
+$phpunit->assertErrors(array(
+ array('package' => 'PEAR_Error', 'message' => 'Configuration file "'
.$temp_path . DIRECTORY_SEPARATOR .
+ 'remote.ini" is empty')
+), 'log errors');
$phpunit->assertEquals(array (
0 =>
array (
@@ -214,15 +218,6 @@
$contents = unserialize($contents[1]);
$config->readConfigFile($temp_path . DIRECTORY_SEPARATOR . 'remote.ini');
$phpunit->assertEquals(array (
- '__channels' =>
- array (
- 'pecl.php.net' =>
- array (
- ),
- '__uri' =>
- array (
- ),
- ),
'php_dir' => $temp_path2 . '/nomake/pear/php',
'data_dir' => $temp_path2 . '/nomake/pear/data',
'ext_dir' => $temp_path2 . '/nomake/pear/ext',
http://cvs.php.net/diff.php/pear-core/tests/PEAR_Command_Config/config-create/test_windows.phpt?r1=1.6&r2=1.7&ty=u
Index: pear-core/tests/PEAR_Command_Config/config-create/test_windows.phpt
diff -u pear-core/tests/PEAR_Command_Config/config-create/test_windows.phpt:1.6
pear-core/tests/PEAR_Command_Config/config-create/test_windows.phpt:1.7
--- pear-core/tests/PEAR_Command_Config/config-create/test_windows.phpt:1.6
Mon Feb 21 12:39:40 2005
+++ pear-core/tests/PEAR_Command_Config/config-create/test_windows.phpt Sat Sep
24 00:25:34 2005
@@ -13,6 +13,10 @@
$temp_path2 = str_replace(DIRECTORY_SEPARATOR, '\\', $temp_path);
$e = $command->run('config-create', array('windows' => true),
array($temp_path2 . DIRECTORY_SEPARATOR . 'nomake', $temp_path .
DIRECTORY_SEPARATOR
. 'remote.ini'));
+$phpunit->assertErrors(array(
+ array('package' => 'PEAR_Error', 'message' => 'Configuration file "'
.$temp_path . DIRECTORY_SEPARATOR .
+ 'remote.ini" is empty')
+), 'log errors');
$phpunit->assertEquals(array (
0 =>
array (
@@ -211,15 +215,6 @@
$contents = unserialize($contents[1]);
$config->readConfigFile($temp_path . DIRECTORY_SEPARATOR . 'remote.ini');
$phpunit->assertEquals(array (
- '__channels' =>
- array (
- 'pecl.php.net' =>
- array (
- ),
- '__uri' =>
- array (
- ),
- ),
'php_dir' => $temp_path2 . '\\nomake\\pear\\php',
'data_dir' => $temp_path2 . '\\nomake\\pear\\data',
'ext_dir' => $temp_path2 . '\\nomake\\pear\\ext',
|