Annotation of embedaddon/php/ext/mysqli/tests/mysqli_close_oo.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: mysqli_close()
        !             3: --SKIPIF--
        !             4: <?php
        !             5: require_once('skipif.inc');
        !             6: require_once('skipifemb.inc');
        !             7: require_once('skipifconnectfailure.inc');
        !             8: ?>
        !             9: --FILE--
        !            10: <?php
        !            11:        require_once("connect.inc");
        !            12: 
        !            13:        $tmp    = NULL;
        !            14:        $link   = NULL;
        !            15: 
        !            16:        if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
        !            17:                printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
        !            18:                        $host, $user, $db, $port, $socket);
        !            19: 
        !            20:        if (!is_null($tmp = @$mysqli->close($link)))
        !            21:                printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
        !            22: 
        !            23:        $tmp = $mysqli->close();
        !            24:        if (true !== $tmp)
        !            25:                printf("[003] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
        !            26: 
        !            27:        if (!is_null($tmp = @$mysqli->close()))
        !            28:                printf("[004] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
        !            29: 
        !            30:        if (!is_null($tmp = @$mysqli->query("SELECT 1")))
        !            31:                printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
        !            32: 
        !            33:        print "done!";
        !            34: ?>
        !            35: --EXPECTF--
        !            36: done!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>