Annotation of embedaddon/php/ext/mysql/tests/001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: mysql connect
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifconnectfailure.inc');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: require_once('connect.inc');
! 11: $test = '';
! 12:
! 13: if ($socket)
! 14: $host = sprintf("%s:%s", $host, $socket);
! 15: else 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';
! 21: mysql_close($db);
! 22:
! 23: /*** test mysql_connect localhost:port ***/
! 24: $db = mysql_connect($host, $user, $passwd, true);
! 25: $test .= ($db) ? '1' : '0';
! 26: mysql_close($db);
! 27:
! 28: var_dump($test);
! 29: print "done!";
! 30: ?>
! 31: --EXPECTF--
! 32: %unicode|string%(2) "11"
! 33: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>