php-src/ext/ftp/tests/ftp_constructor.phpt
Ayesh Karunaratne 68224f2a41 Move FTP extension class FTPConnection to FTP\Connection
With the [namespaces in bundled extensions RFC](https://wiki.php.net/rfc/namespaces_in_bundled_extensions) passed, renaming the new `\FTPConnection` class to `\FTP\Connection`.
This also adds an entry to `./UPGRADING` file.

Related: #6925, #5945
2021-05-08 16:40:10 +02:00

16 lines
316 B
PHP

--TEST--
Attempt to instantiate an FTP\Connection directly
--EXTENSIONS--
ftp
pcntl
--FILE--
<?php
try {
new FTP\Connection();
} catch (Error $ex) {
echo "Exception: ", $ex->getMessage(), "\n";
}
--EXPECT--
Exception: Cannot directly construct FTP\Connection, use ftp_connect() or ftp_ssl_connect() instead