xref: /php-src/ext/ftp/tests/ftp_constructor.phpt (revision f39b5c4c)
1--TEST--
2Attempt to instantiate an FTP\Connection directly
3--EXTENSIONS--
4ftp
5pcntl
6--FILE--
7<?php
8
9try {
10    new FTP\Connection();
11} catch (Error $ex) {
12    echo "Exception: ", $ex->getMessage(), "\n";
13}
14?>
15--EXPECT--
16Exception: Cannot directly construct FTP\Connection, use ftp_connect() or ftp_ssl_connect() instead
17