summaryrefslogtreecommitdiff
path: root/ext/ftp/tests/ftp_constructor.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ftp/tests/ftp_constructor.phpt')
-rw-r--r--ext/ftp/tests/ftp_constructor.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/ftp/tests/ftp_constructor.phpt b/ext/ftp/tests/ftp_constructor.phpt
new file mode 100644
index 0000000000..881677f6a5
--- /dev/null
+++ b/ext/ftp/tests/ftp_constructor.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Attempt to instantiate an FTPConnection directly
+--SKIPIF--
+<?php
+require 'skipif.inc';
+--FILE--
+<?php
+
+try {
+ new FTPConnection();
+} catch (Error $ex) {
+ echo "Exception: ", $ex->getMessage(), "\n";
+}
+--EXPECT--
+Exception: Cannot directly construct FTPConnection, use ftp_connect() or ftp_ssl_connect() instead