Skip to content

Commit 137456f

Browse files
committed
[LDAP] Add test for LDAP\Connection ctor
1 parent f72f359 commit 137456f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ext/ldap/tests/ldap_constructor.phpt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
Attempt to instantiate an LDAP\Connection directly
3+
--EXTENSIONS--
4+
ldap
5+
--FILE--
6+
<?php
7+
8+
try {
9+
new LDAP\Connection();
10+
} catch (Error $ex) {
11+
echo "Exception: ", $ex->getMessage(), "\n";
12+
}
13+
--EXPECT--
14+
Exception: Cannot directly construct LDAP\Connection, use ldap_create() instead

0 commit comments

Comments
 (0)