Files
archived-pecl-networking-ssh2/tests/ssh2_auth.phpt
Sara Golemon faa3a1fe97 Add some unit tests
Since these all need a test ssh server to connect to,
you'll need to set some environment variables.

TEST_SSH2_HOSTNAME - Where to connect to
TEST_SSH2_PORT     - Port (default: 22)
TEST_SSH2_USER     - Login as (default: getenv('USER'))
TEST_SSH2_AUTH     - Mode of authentication ('none', 'password', 'agent')
TEST_SSH2_PASS     - Password to authenticate with
TEST_SSH2_TEMPDIR  - Where to store temporary files on the remote filesystem
                     (default: /tmp )
2013-03-03 07:48:44 -08:00

12 lines
283 B
PHP

--TEST--
ssh2_auth_FOO() - Attempt to authenticate to a remote host
--SKIPIF--
<?php require('ssh2_skip.inc'); ssh2t_needs_auth(); ?>
--FILE--
<?php require('ssh2_test.inc');
$ssh = ssh2_connect(TEST_SSH2_HOSTNAME, TEST_SSH2_PORT);
var_dump(ssh2t_auth($ssh));
--EXPECT--
bool(true)