summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2006-07-30 11:03:30 +0000
committerGeorg Richter <georg@php.net>2006-07-30 11:03:30 +0000
commit0ba0abbd404f1ddf7d7a5a6e6052d2f6efae9700 (patch)
treebda29442313bdabb6f34c260a9e16fe76290a38c
parent509761f96de05d91b86b98ee2d236c01007d5e1c (diff)
downloadphp-git-0ba0abbd404f1ddf7d7a5a6e6052d2f6efae9700.tar.gz
Added testcase for bug #37090
-rw-r--r--ext/mysqli/tests/bug37090.phpt37
1 files changed, 37 insertions, 0 deletions
diff --git a/ext/mysqli/tests/bug37090.phpt b/ext/mysqli/tests/bug37090.phpt
new file mode 100644
index 0000000000..de6043d38a
--- /dev/null
+++ b/ext/mysqli/tests/bug37090.phpt
@@ -0,0 +1,37 @@
+--TEST--
+bug #37090: mysqli_set_charset return code
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+ include "connect.inc";
+
+ $mysql = new mysqli($host, $user, $passwd);
+
+ $cs = array();
+ $cs[] = $mysql->set_charset("latin5");
+ $cs[] = $mysql->character_set_name();
+
+ $cs[] = $mysql->set_charset("utf8");
+ $cs[] = $mysql->character_set_name();
+
+ $cs[] = $mysql->set_charset("notdefined");
+ $cs[] = $mysql->character_set_name();
+
+ var_dump($cs);
+?>
+--EXPECT--
+array(6) {
+ [0]=>
+ bool(true)
+ [1]=>
+ string(6) "latin5"
+ [2]=>
+ bool(true)
+ [3]=>
+ string(4) "utf8"
+ [4]=>
+ bool(false)
+ [5]=>
+ string(4) "utf8"
+}