cvs: pear-core /tests/PEAR_Command_Config/config-get test.phpt test_default_channel.phpt test_opt.phpt
| From: | Greg Beaver | Date: | Fri, 26 Nov 2004 21:55:04 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Command_Config/config-get test.phpt test_default_channel.phpt test_opt.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-26557@lists.php.net to get a copy of this message | ||
cellog Fri Nov 26 16:55:04 2004 EDT
Added files:
/pear-core/tests/PEAR_Command_Config/config-get test.phpt
test_default_channel.phpt
test_opt.phpt
Log:
new tests
http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Config/config-get/test.phpt?r=1.1&p=1
Index: pear-core/tests/PEAR_Command_Config/config-get/test.phpt
+++ pear-core/tests/PEAR_Command_Config/config-get/test.phpt
--TEST--
config-get 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';
$config->set('verbose', 34, 'user');
$config->set('verbose', 45, 'system');
$config->set('verbose', 56, 'user', '__uri');
$config->set('verbose', 67, 'system', '__uri');
$e = $command->run('config-get', array(), array('verbose'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 34,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose');
$e = $command->run('config-get', array(), array('verbose',
'user'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 34,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose user');
$e = $command->run('config-get', array(), array('verbose',
'system'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 45,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose system');
echo 'tests done';
?>
--EXPECT--
tests done
http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Config/config-get/test_default_channel.phpt?r=1.1&p=1
Index: pear-core/tests/PEAR_Command_Config/config-get/test_default_channel.phpt
+++ pear-core/tests/PEAR_Command_Config/config-get/test_default_channel.phpt
--TEST--
config-get command with default_channel
--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';
$config->set('verbose', 34, 'user');
$config->set('verbose', 45, 'system');
$config->set('verbose', 56, 'user', '__uri');
$config->set('verbose', 67, 'system', '__uri');
$config->set('default_channel', '__uri');
$e = $command->run('config-get', array(), array('verbose'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 56,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose');
$e = $command->run('config-get', array(), array('verbose',
'user'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 56,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose user');
$e = $command->run('config-get', array(), array('verbose',
'system'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 67,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose system');
echo 'tests done';
?>
--EXPECT--
tests done
http://cvs.php.net/co.php/pear-core/tests/PEAR_Command_Config/config-get/test_opt.phpt?r=1.1&p=1
Index: pear-core/tests/PEAR_Command_Config/config-get/test_opt.phpt
+++ pear-core/tests/PEAR_Command_Config/config-get/test_opt.phpt
--TEST--
config-get command with --channel option
--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';
$config->set('verbose', 34, 'user');
$config->set('verbose', 45, 'system');
$config->set('verbose', 56, 'user', '__uri');
$config->set('verbose', 67, 'system', '__uri');
$e = $command->run('config-get', array('channel' => '__uri'),
array('verbose'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 56,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose');
$e = $command->run('config-get', array('channel' => '__uri'),
array('verbose', 'user'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 56,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose user');
$e = $command->run('config-get', array('channel' => '__uri'),
array('verbose', 'system'));
$phpunit->assertEquals(array (
0 =>
array (
'info' => 67,
'cmd' => 'config-get',
),
), $fakelog->getLog(), 'verbose system');
echo 'tests done';
?>
--EXPECT--
tests done