cvs: pear-core /tests/PEAR_Command_Channels/channel-delete test.phpt
| From: | Greg Beaver | Date: | Wed, 15 Dec 2004 02:22:07 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Command_Channels/channel-delete test.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-27407@lists.php.net to get a copy of this message | ||
cellog Tue Dec 14 21:22:07 2004 EDT
Added files:
/pear-core/tests/PEAR_Command_Channels/channel-delete test.phpt
Log:
new test
http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Channels/channel-delete/test.phpt?r=1.1&p=1
Index: pear-core/tests/PEAR_Command_Channels/channel-delete/test.phpt
+++ pear-core/tests/PEAR_Command_Channels/channel-delete/test.phpt
--TEST--
channel-delete command
--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('fake');
$ch->setSummary('fake');
$ch->setServer('pear.php.net');
$ch->setDefaultPEARProtocols();
$reg->addChannel($ch);
$chan = $reg->getChannel('fake');
$phpunit->assertIsA('PEAR_ChannelFile', $chan, 'added ok?');
$phpunit->assertEquals('fake', $chan->getName(), 'name ok?');
$e = $command->run('channel-delete', array(), array('fake'));
$phpunit->assertNoErrors('after');
$phpunit->assertEquals(array (
0 =>
array (
'info' => 'Channel "fake" deleted',
'cmd' => 'no command',
),
), $fakelog->getLog(), 'log');
$chan = $reg->getChannel('fake');
$phpunit->assertFalse($chan, 'after delete');
echo 'tests done';
?>
--EXPECT--
tests done