diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-14 14:11:58 -0400 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-08-14 14:11:58 -0400 |
commit | 2973ccbd48f9cc8a16cfad8f3ab0e9fc36b36763 (patch) | |
tree | c706c858cf6477b53a9ab933ca6625245bd73f79 /tests | |
parent | 386883cda1b0be64a77ddeaff1b5a52acaa97648 (diff) | |
download | forums-2973ccbd48f9cc8a16cfad8f3ab0e9fc36b36763.tar forums-2973ccbd48f9cc8a16cfad8f3ab0e9fc36b36763.tar.gz forums-2973ccbd48f9cc8a16cfad8f3ab0e9fc36b36763.tar.bz2 forums-2973ccbd48f9cc8a16cfad8f3ab0e9fc36b36763.tar.xz forums-2973ccbd48f9cc8a16cfad8f3ab0e9fc36b36763.zip |
[ticket/9297] Skip FTP PASV/EPSV test if FTP connection fails.
It is possible to configure PHP without IPv6, in which case
IPv6-encapsulated IPv4 addresses won't be accepted by PHP.
Instead of failing the test suite on such setups, skip the
offending test.
PHPBB3-9297
Diffstat (limited to 'tests')
-rw-r--r-- | tests/network/ftp_fsock_test.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/network/ftp_fsock_test.php b/tests/network/ftp_fsock_test.php index ab45c0202b..93b15074db 100644 --- a/tests/network/ftp_fsock_test.php +++ b/tests/network/ftp_fsock_test.php @@ -44,7 +44,16 @@ class phpbb_ftp_fsock_test extends phpbb_test_case protected function assert_ls_contains_debian($hostname) { $o = $this->get_object($hostname); - $o->_init(); + $result = $o->_init(); + // PHP can connect to IPv6 addresses which are IPv6-encapsulated + // IPv4 addresses on systems that don't have IPv6 connectivity, + // provided that PHP was built with IPv6 support. + // If this test fails on such an IPv6-encapsulated IPv4 address, + // check whether you disabled IPv6 support in your PHP. + if ($result !== true) + { + $this->markTestSkipped("Failed to connect to $hostname: $result"); + } $this->assertContains('debian', $o->_ls()); $o->_close(); } |