cvs: pear-core /tests/PEAR_Command_Auth/login test.phpt /tests/PEAR_Command_Auth/logout test.phpt
| From: | Pierre-Alain Joye | Date: | Tue, 18 Jul 2006 07:08:44 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Command_Auth/login test.phpt /tests/PEAR_Command_Auth/logout test.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4882@lists.php.net to get a copy of this message | ||
pajoye Tue Jul 18 07:08:44 2006 UTC
Modified files:
/pear-core/tests/PEAR_Command_Auth/login test.phpt
/pear-core/tests/PEAR_Command_Auth/logout test.phpt
Log:
- restore missing filex
http://cvs.php.net/viewvc.cgi/pear-core/tests/PEAR_Command_Auth/login/test.phpt?r1=1.1&r2=1.2&diff_format=u
Index: pear-core/tests/PEAR_Command_Auth/login/test.phpt
diff -u /dev/null pear-core/tests/PEAR_Command_Auth/login/test.phpt:1.2
--- /dev/null Tue Jul 18 07:08:44 2006
+++ pear-core/tests/PEAR_Command_Auth/login/test.phpt Tue Jul 18 07:08:44 2006
@@ -0,0 +1,37 @@
+--TEST--
+login 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';
+$fakelog->setDialogOutput(array('login',
+ array('Username', 'Password'),
+ array('text', 'password'),
+ array(@$_ENV['USER'], '')), array('cellog',
'hi'));
+$pearweb->addXmlrpcConfig("pear.php.net", "logintest", null, true);
+$command->run('login', array(), array());
+$phpunit->assertNoErrors('test');
+$phpunit->assertEquals(array (
+ 0 =>
+ array (
+ 'info' => 'Logging in to pear.php.net.',
+ 'cmd' => 'login',
+ ),
+ 1 =>
+ array (
+ 'info' => 'Logged in.',
+ 'cmd' => 'login',
+ ),
+), $fakelog->getLog(), 'log');
+$phpunit->assertEquals('cellog', $config->get('username'),
'username');
+$phpunit->assertEquals('hi', $config->get('password'),
'password');
+echo 'tests done';
+?>
+--EXPECT--
+tests done
http://cvs.php.net/viewvc.cgi/pear-core/tests/PEAR_Command_Auth/logout/test.phpt?r1=1.1&r2=1.2&diff_format=u
Index: pear-core/tests/PEAR_Command_Auth/logout/test.phpt
diff -u /dev/null pear-core/tests/PEAR_Command_Auth/logout/test.phpt:1.2
--- /dev/null Tue Jul 18 07:08:44 2006
+++ pear-core/tests/PEAR_Command_Auth/logout/test.phpt Tue Jul 18 07:08:44 2006
@@ -0,0 +1,48 @@
+--TEST--
+logout 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';
+$fakelog->setDialogOutput(array('login',
+ array('Username', 'Password'),
+ array('text', 'password'),
+ array(@$_ENV['USER'], '')), array('cellog',
'hi'));
+$pearweb->addXmlrpcConfig("pear.php.net", "logintest", null, true);
+$command->run('login', array(), array());
+$phpunit->assertNoErrors('test');
+$phpunit->assertEquals(array (
+ 0 =>
+ array (
+ 'info' => 'Logging in to pear.php.net.',
+ 'cmd' => 'login',
+ ),
+ 1 =>
+ array (
+ 'info' => 'Logged in.',
+ 'cmd' => 'login',
+ ),
+), $fakelog->getLog(), 'log');
+$phpunit->assertEquals('cellog', $config->get('username'),
'username');
+$phpunit->assertEquals('hi', $config->get('password'),
'password');
+$command->run('logout', array(), array());
+$phpunit->assertNoErrors('test');
+$phpunit->assertEquals(array (
+ 0 =>
+ array (
+ 'info' => 'Logging out from pear.php.net.',
+ 'cmd' => 'logout',
+ ),
+), $fakelog->getLog(), 'log');
+$phpunit->assertEquals('', $config->get('username'),
'username');
+$phpunit->assertEquals('', $config->get('password'),
'password');
+echo 'tests done';
+?>
+--EXPECT--
+tests done