Files
archived-pecl-networking-ssh2/tests/ssh2_skip.inc
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

18 lines
407 B
PHP

<?php
require('ssh2_test.inc');
if (!extension_loaded("ssh2")) print "skip extension not loaded";
if (TEST_SSH2_HOSTNAME === false) print "skip TEST_SSH2_HOSTNAME not set";
function ssh2t_needs_auth() {
if (TEST_SSH2_AUTH == 'none') {
print "skip TEST_SSH2_AUTH == 'none'";
}
}
function ssh2t_writes_remote() {
if (!TEST_SSH2_TEMPDIR) {
print "skip TEST_SSH2_TEMPDIR is empty";
}
}