cvs: pear-core /tests/PEAR_Command_Channels/channel-alias test.phpt
| From: | Greg Beaver | Date: | Wed, 15 Dec 2004 02:46:21 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Command_Channels/channel-alias test.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-27411@lists.php.net to get a copy of this message | ||
cellog Tue Dec 14 21:46:21 2004 EDT
Added files:
/pear-core/tests/PEAR_Command_Channels/channel-alias test.phpt
Log:
new test
http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Channels/channel-alias/test.phpt?r=1.1&p=1
Index: pear-core/tests/PEAR_Command_Channels/channel-alias/test.phpt
+++ pear-core/tests/PEAR_Command_Channels/channel-alias/test.phpt
--TEST--
channel-alias 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();
$phpunit->assertFalse($reg->isAlias('foo'), 'test alias before');
$e = $command->run('channel-alias', array(), array('pear.php.net',
'foo'));
$phpunit->assertNoErrors('after');
$phpunit->assertEquals(array (
0 =>
array (
'info' => 'Channel "pear.php.net" aliased successfully to
"foo"',
'cmd' => 'no command',
),
), $fakelog->getLog(), 'log');
$phpunit->assertTrue($reg->isAlias('foo'), 'test alias foo after');
$phpunit->assertFalse($reg->isAlias('pear'), 'test alias pear after');
echo 'tests done';
?>
--EXPECT--
tests done