Annotation of embedaddon/php/ext/mysqli/tests/mysqli_embedded_connect.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: mysqli_embedded_connect()
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifnotemb.inc');
! 7: require_once('skipifconnectfailure.inc');
! 8: ?>
! 9: --FILE--
! 10: <?php
! 11: require_once("connect.inc");
! 12: $tmp = NULL;
! 13: $link = NULL;
! 14:
! 15: if (NULL !== ($tmp = @mysqli_embedded_connect()))
! 16: printf("[001] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
! 17:
! 18: if (!$link = mysqli_embedded_connect($db)) {
! 19: printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
! 20: $host, $user, $db, $port, $socket);
! 21: }
! 22:
! 23: if (!is_bool($tmp = mysqli_embedded_connect($db . '_unknown')))
! 24: printf("[003] Expecting boolean/[true|false] value, got %s/%s\n", gettype($tmp), $tmp);
! 25:
! 26: mysqli_close($link);
! 27:
! 28: print "done!";
! 29: ?>
! 30: --EXPECTF--
! 31: Warning: mysqli_embedded_connect() expects parameter 1 to be mysqli, null given in %s on line %d
! 32: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>