php-src/ext/ldap/tests/ldap_constructor.phpt
Christoph M. Becker b8ac2071b8
Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
There is no `ldap_create()`, but rather `ldap_connect()`.

Closes GH-10115.
2022-12-16 14:36:30 +01:00

14 lines
294 B
PHP

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