cvs: pear-core /tests/PEAR_Command test_factory.phpt

From: Date: Fri, 26 Nov 2004 19:42:34 +0000
Subject: cvs: pear-core /tests/PEAR_Command test_factory.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-26531@lists.php.net to get a copy of this message
cellog Fri Nov 26 14:42:34 2004 EDT Added files: /pear-core/tests/PEAR_Command test_factory.phpt Log: new test http://cvs.php.net/co.php/pear-core/tests/PEAR_Command/test_factory.phpt?r=1.1&p=1 Index: pear-core/tests/PEAR_Command/test_factory.phpt +++ pear-core/tests/PEAR_Command/test_factory.phpt --TEST-- PEAR_Command::factory() --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc'; require_once 'PEAR/Frontend/CLI.php'; PEAR_Command::registerCommands(false, dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fakecommands'); $err = &PEAR_Command::factory('smogin', $config); $phpunit->assertErrors(array( array('package' => 'PEAR_Error', 'message' => 'unknown command `smogin\''), ), 'smogin'); $val = &PEAR_Command::factory('sm', $config); $phpunit->assertIsa('PEAR_Command_Foo', $val, 'sm'); $val = &PEAR_Command::factory('smong', $config); $phpunit->assertIsa('PEAR_Command_Foo', $val, 'smong'); $val = &PEAR_Command::factory('ye', $config); $phpunit->assertIsa('PEAR_Command_Foo', $val, 'ye'); $val = &PEAR_Command::factory('yertl', $config); $phpunit->assertIsa('PEAR_Command_Foo', $val, 'yertl'); $val = &PEAR_Command::factory('li', $config); $phpunit->assertIsa('PEAR_Command_Grunk', $val, 'li'); $val = &PEAR_Command::factory('login', $config); $phpunit->assertIsa('PEAR_Command_Grunk', $val, 'login'); $val = &PEAR_Command::factory('lo', $config); $phpunit->assertIsa('PEAR_Command_Grunk', $val, 'lo'); $val = &PEAR_Command::factory('logout', $config); $phpunit->assertIsa('PEAR_Command_Grunk', $val, 'logout'); echo 'tests done'; ?> --EXPECT-- tests done

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