cvs: pear-core /tests/PEAR_Command_Channels/channel-discover test_fail.phpt
| From: | Greg Beaver | Date: | Wed, 15 Dec 2004 03:21:38 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Command_Channels/channel-discover test_fail.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-27416@lists.php.net to get a copy of this message | ||
cellog Tue Dec 14 22:21:38 2004 EDT
Added files:
/pear-core/tests/PEAR_Command_Channels/channel-discover
test_fail.phpt
Log:
new test
http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Channels/channel-discover/test_fail.phpt?r=1.1&p=1
Index: pear-core/tests/PEAR_Command_Channels/channel-discover/test_fail.phpt
+++ pear-core/tests/PEAR_Command_Channels/channel-discover/test_fail.phpt
--TEST--
channel-discover 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';
$reg = &$config->getRegistry();
$e = $command->run('channel-discover', array(), array('pear'));
$phpunit->assertErrors(array(
array('package' => 'PEAR_Error', 'message' => 'A
channel alias named "pear" already exists, aliasing channel
"pear.php.net"'),
), 'no params');
$e = $command->run('channel-discover', array(), array('pear.php.net'));
$phpunit->assertErrors(array(
array('package' => 'PEAR_Error', 'message' => 'Channel
"pear.php.net" is already initialized'),
), 'nonexistent');
$e = $command->run('channel-discover', array(), array());
$phpunit->assertErrors(array(
array('package' => 'PEAR_Error', 'message' => 'No
channel server specified'),
), 'pear');
$e = $command->run('channel-discover', array(), array('zornk.net'));
$phpunit->assertErrors(array(
array('package' => 'PEAR_Error', 'message' =>
'Discovery of channel "zornk.net" failed'),
), 'zornk');
echo 'tests done';
?>
--EXPECT--
tests done