summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Wendel <uw@php.net>2009-12-09 12:06:10 (GMT)
committerUlf Wendel <uw@php.net>2009-12-09 12:06:10 (GMT)
commit671ebe958a64b56d08c2c5a9ad174547c54fa7f3 (patch)
tree7f1ef4f870a0d1cbc12bf6992a578cdf03c0b8b0
parentbf377f6aab9536d70eac24380ed472db7d789e96 (diff)
downloadphp-671ebe958a64b56d08c2c5a9ad174547c54fa7f3.tar.gz
Adapting tests to accept actual behaviour found in 5.2, 5.3 and 6.0. The behaviour is wrong according to the documentation: mysqli_connect_error() should return an empty string (not NULL), if there is no error. However, changing this would break BC and most users will not notice the difference between NULL and empty string anyway.
-rw-r--r--ext/mysqli/tests/bug34810.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_class_mysqli_interface.phpt2
-rw-r--r--ext/mysqli/tests/mysqli_connect_error.phpt4
-rw-r--r--ext/mysqli/tests/mysqli_kill.phpt2
4 files changed, 6 insertions, 6 deletions
diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt
index 19a7e58..998d9f0 100644
--- a/ext/mysqli/tests/bug34810.phpt
+++ b/ext/mysqli/tests/bug34810.phpt
@@ -55,7 +55,7 @@ object(mysqli)#%d (%d) {
[%u|b%"connect_errno"]=>
int(0)
[%u|b%"connect_error"]=>
- %unicode|string%(0) ""
+ NULL
[%u|b%"errno"]=>
int(0)
[%u|b%"error"]=>
@@ -91,7 +91,7 @@ object(mysqli)#%d (%d) {
[%u|b%"connect_errno"]=>
int(0)
[%u|b%"connect_error"]=>
- %unicode|string%(0) ""
+ NULL
[%u|b%"errno"]=>
int(0)
[%u|b%"error"]=>
diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
index ad914b7..b86f69c 100644
--- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
+++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt
@@ -276,6 +276,6 @@ setting mysqli->unknown, mysqli_unknown = '13'
setting mysqli->unknown, mysqli_unknown = 'friday'
Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):
-mysqli->connect_error = ''/%unicode|string% (''/%unicode|string%)
+mysqli->connect_error = ''/NULL (''/NULL)
mysqli->connect_errno = '0'/integer ('0'/integer)
done! \ No newline at end of file
diff --git a/ext/mysqli/tests/mysqli_connect_error.phpt b/ext/mysqli/tests/mysqli_connect_error.phpt
index dc4db6a..79ac3f1 100644
--- a/ext/mysqli/tests/mysqli_connect_error.phpt
+++ b/ext/mysqli/tests/mysqli_connect_error.phpt
@@ -21,8 +21,8 @@ require_once('skipifconnectfailure.inc');
printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
- if ('' !== ($tmp = mysqli_connect_error()))
- printf("[003] Expecting string/'', got %s/%s\n", gettype($tmp), $tmp);
+ if (NULL !== ($tmp = mysqli_connect_error()))
+ printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt
index f680a68..5706adf 100644
--- a/ext/mysqli/tests/mysqli_kill.phpt
+++ b/ext/mysqli/tests/mysqli_kill.phpt
@@ -91,7 +91,7 @@ object(mysqli)#%d (%d) {
[%u|b%"connect_errno"]=>
int(0)
[%u|b%"connect_error"]=>
- %unicode|string%(0) ""
+ NULL
[%u|b%"errno"]=>
int(2006)
[%u|b%"error"]=>