diff --git a/tests/Functional/Net/SFTPWrongServerTest.php b/tests/Functional/Net/SFTPWrongServerTest.php new file mode 100644 index 00000000..0a715f1e --- /dev/null +++ b/tests/Functional/Net/SFTPWrongServerTest.php @@ -0,0 +1,18 @@ +login('username', 'password'); + static::fail('The connection to the non-existent server must not succeed.'); + } catch (UnableToConnectException $e) { + static::assertSame('Cannot connect to dummy-server:22. Error 0. php_network_getaddresses: getaddrinfo failed: Name or service not known', $e->getMessage()); + } + } +}