php-src/ext/ldap/tests/ldap_connect_variation.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

37 lines
758 B
PHP

--TEST--
ldap_connect() - Variation
--CREDITS--
Patrick Allaert <patrickallaert@php.net>
# Belgian PHP Testfest 2009
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
require "connect.inc";
// no hostname, no port
$link = ldap_connect();
var_dump($link);
// no port
$link = ldap_connect($host);
var_dump($link);
// URI
$link = ldap_connect("ldap://$host:$port");
var_dump($link);
// URI no port
$link = ldap_connect("ldap://$host");
var_dump($link);
// bad hostname (connect should work, not bind)
$link = ldap_connect("nonexistent" . $host);
var_dump($link);
?>
--EXPECTF--
resource(%d) of type (ldap link)
resource(%d) of type (ldap link)
resource(%d) of type (ldap link)
resource(%d) of type (ldap link)
resource(%d) of type (ldap link)