Fix tests
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 30 Jul 2019 14:32:49 +0000 (16:32 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 30 Jul 2019 14:32:49 +0000 (16:32 +0200)
Apparently, nobody is testing with MySQL < 5.6 for quite a while.  We
should consider dropping support for these very old versions.

ext/mysqli/tests/mysqli_change_user_old.phpt
ext/mysqli/tests/mysqli_change_user_oo.phpt
ext/mysqli/tests/mysqli_report_wo_ps.phpt

index cf53016f59d734e13165a23b2194a3cddce3a3fe..a077d9c4b62b5cf6c5dccb9b080551938fdc5926 100644 (file)
@@ -20,21 +20,6 @@ if (mysqli_get_server_version($link) >= 50600)
        $tmp    = NULL;
        $link   = NULL;
 
-       if (!is_null($tmp = @mysqli_change_user()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link)))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link, $link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link, $link, $link)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @mysqli_change_user($link, $link, $link, $link, $link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
                printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
@@ -118,8 +103,8 @@ if (mysqli_get_server_version($link) >= 50600)
 
        mysqli_close($link);
 
-       if (NULL !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
-               printf("[026] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+       if (false !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
+               printf("[026] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
        print "done!";
 ?>
index 5203381088eec6f5f259b92a69021b2a84be6092..7707cca095f8a62d931d9874b90298e0cabd9937 100644 (file)
@@ -25,18 +25,6 @@ if (mysqli_get_server_version($link) >= 50600)
                printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
                        $host, $user, $db, $port, $socket);
 
-       if (!is_null($tmp = @$mysqli->change_user()))
-               printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @$mysqli->change_user($link)))
-               printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @$mysqli->change_user($link, $link)))
-               printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
-       if (!is_null($tmp = @$mysqli->change_user($link, $link, $link, $link)))
-               printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (false !== ($tmp = $mysqli->change_user($user . '_unknown_really', $passwd . 'non_empty', $db)))
                printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
@@ -83,8 +71,8 @@ if (mysqli_get_server_version($link) >= 50600)
 
        $mysqli->close();
 
-       if (NULL !== ($tmp = @$mysqli->change_user($user, $passwd, $db)))
-               printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+       if (false !== ($tmp = @$mysqli->change_user($user, $passwd, $db)))
+               printf("[018] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
 
        print "done!";
 ?>
index d08ffa5e7d25b50dfb1ef47eafbb0e347b23da0d..535efb1facacb5fe01ba022deaa06b29fb05b47c 100644 (file)
@@ -20,9 +20,6 @@ if (mysqli_get_server_version($link) >= 50600)
        $tmp    = NULL;
        $link   = NULL;
 
-       if (NULL !== ($tmp = @mysqli_report()))
-               printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
-
        if (true !== ($tmp = mysqli_report(-1)))
                printf("[002] Expecting boolean/true even for invalid flags, got %s/%s\n", gettype($tmp), $tmp);