xref: /PHP-5.3/ext/mysql/tests/001.phpt (revision 610c7fbe)
1--TEST--
2mysql connect
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10require_once('connect.inc');
11$test = '';
12
13if ($socket)
14	$host = sprintf("%s:%s", $host, $socket);
15else if ($port)
16	$host = sprintf("%s:%s", $host, $port);
17
18/*** test mysql_connect localhost ***/
19$db = mysql_connect($host, $user, $passwd);
20$test .= ($db) ? '1' : '0';
21mysql_close($db);
22
23/*** test mysql_connect localhost:port ***/
24$db = mysql_connect($host, $user, $passwd, true);
25$test .= ($db) ? '1' : '0';
26mysql_close($db);
27
28var_dump($test);
29print "done!";
30?>
31--EXPECTF--
32%unicode|string%(2) "11"
33done!
34