cvs: pear-core /tests/PEAR_Command_Channels/channel-alias test_fail.phpt

From: Date: Wed, 15 Dec 2004 02:56:49 +0000
Subject: cvs: pear-core /tests/PEAR_Command_Channels/channel-alias test_fail.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-27414@lists.php.net to get a copy of this message
cellog Tue Dec 14 21:56:49 2004 EDT Added files: /pear-core/tests/PEAR_Command_Channels/channel-alias test_fail.phpt Log: new test http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Channels/channel-alias/test_fail.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command_Channels/channel-alias/test_fail.phpt +++ pear-core/tests/PEAR_Command_Channels/channel-alias/test_fail.phpt --TEST-- channel-alias 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-alias', array(), array('pear.php.net')); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => 'No channel alias specified'), ), 'no params'); $e = $command->run('channel-alias', array(), array('pear.php.net', 'foo', 'bar')); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => 'Invalid format, correct is: channel-alias channel alias'), ), 'nonexistent'); $e = $command->run('channel-alias', array(), array('zonk', 'pear')); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => '"zonk" is not a valid channel'), ), 'pear'); $e = $command->run('channel-alias', array(), array('__uri', 'pear')); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => 'Channel "pear.php.net" is already aliased to "pear", cannot re-alias'), ), 'pear.php.net'); $e = $command->run('channel-alias', array(), array('__uri', '@#$^*&@')); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => 'Alias "@#$^*&@" is not a valid channel alias'), array('package' => 'PEAR_ChannelFile', 'message' => 'Invalid channel suggestedalias "@#$^*&@"'), ), '__uri'); echo 'tests done'; ?> --EXPECT-- tests done

« previous php.pear.cvs (#27414) next »