cvs: pear-core /tests/PEAR_Command_Config/config-set test.phpt

From: Date: Fri, 26 Nov 2004 21:14:48 +0000
Subject: cvs: pear-core /tests/PEAR_Command_Config/config-set test.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-26548@lists.php.net to get a copy of this message
cellog Fri Nov 26 16:14:48 2004 EDT Modified files: /pear-core/tests/PEAR_Command_Config/config-set test.phpt Log: re-organize test http://cvs.php.net/diff.php/pear-core/tests/PEAR_Command_Config/config-set/test.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Command_Config/config-set/test.phpt diff -u pear-core/tests/PEAR_Command_Config/config-set/test.phpt:1.2 pear-core/tests/PEAR_Command_Config/config-set/test.phpt:1.3 --- pear-core/tests/PEAR_Command_Config/config-set/test.phpt:1.2 Fri Nov 26 16:02:49 2004 +++ pear-core/tests/PEAR_Command_Config/config-set/test.phpt Fri Nov 26 16:14:48 2004 @@ -22,21 +22,6 @@ ), $fakelog->getLog(), 'ui log'); $phpunit->assertEquals('poo', $config->get('php_dir'), 'php_dir'); -$configinfo = array('master_server' => $server, - 'preferred_state' => 'stable', - 'cache_dir' => $temp_path . DIRECTORY_SEPARATOR . 'cache', - 'php_dir' => 'poo', - 'ext_dir' => $temp_path . DIRECTORY_SEPARATOR . 'ext', - 'data_dir' => $temp_path . DIRECTORY_SEPARATOR . 'data', - 'doc_dir' => $temp_path . DIRECTORY_SEPARATOR . 'doc', - 'test_dir' => $temp_path . DIRECTORY_SEPARATOR . 'test', - 'bin_dir' => $temp_path . DIRECTORY_SEPARATOR . 'bin', - '__channels' => array('__uri' => array())); - -$info = explode("\n", implode('', file($temp_path . DIRECTORY_SEPARATOR . 'pear.ini'))); -$info = unserialize($info[1]); -$phpunit->assertEquals($configinfo, $info, 'saved 1'); - $phpunit->assertEquals($temp_path . DIRECTORY_SEPARATOR . 'php', $config->get('php_dir', 'system'), 'setup system'); $command->run('config-set', array(), array('php_dir', 'poo', 'system')); $phpunit->assertNoErrors('after'); @@ -48,6 +33,7 @@ ), ), $fakelog->getLog(), 'ui log'); $phpunit->assertEquals('poo', $config->get('php_dir', 'system'), 'php_dir'); + $configinfo = array('master_server' => $server, 'preferred_state' => 'stable', 'cache_dir' => $temp_path . DIRECTORY_SEPARATOR . 'cache', @@ -59,6 +45,10 @@ 'bin_dir' => $temp_path . DIRECTORY_SEPARATOR . 'bin', '__channels' => array('__uri' => array())); +$info = explode("\n", implode('', file($temp_path . DIRECTORY_SEPARATOR . 'pear.ini'))); +$info = unserialize($info[1]); +$phpunit->assertEquals($configinfo, $info, 'saved 1'); + $info = explode("\n", implode('', file($temp_path . DIRECTORY_SEPARATOR . 'pear.conf'))); $info = unserialize($info[1]); $phpunit->assertEquals($configinfo, $info, 'saved 2');

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