From: Ulf Wendel Date: Wed, 10 Oct 2007 10:08:29 +0000 (+0000) Subject: Changes to 04*.phpt, 05*.phpt. X-Git-Tag: RELEASE_1_3_1~877 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=041d506a868e8427e87b5952d0508d9e0e820bad;p=php Changes to 04*.phpt, 05*.phpt. --- diff --git a/ext/mysqli/tests/040.phpt b/ext/mysqli/tests/040.phpt index 79bfe0d5fb..fa1754a562 100644 --- a/ext/mysqli/tests/040.phpt +++ b/ext/mysqli/tests/040.phpt @@ -1,16 +1,19 @@ --TEST-- function test: mysqli_num_rows() --SKIPIF-- - + --FILE-- --EXPECT-- int(1) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/041.phpt b/ext/mysqli/tests/041.phpt index 90bed1ad49..81bd808c4b 100644 --- a/ext/mysqli/tests/041.phpt +++ b/ext/mysqli/tests/041.phpt @@ -1,15 +1,18 @@ --TEST-- function test: mysqli_warning_count() --SKIPIF-- - + --FILE-- --EXPECT-- int(1) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/042.phpt b/ext/mysqli/tests/042.phpt index 719e24925d..bb622b3e30 100644 --- a/ext/mysqli/tests/042.phpt +++ b/ext/mysqli/tests/042.phpt @@ -1,25 +1,28 @@ --TEST-- mysqli_fetch_object --SKIPIF-- - + --FILE-- --EXPECTF-- object(stdClass)#%d (7) { @@ -60,3 +64,22 @@ object(stdClass)#%d (7) { ["c7"]=> string(1) "0" } +done! +--UEXPECTF-- +object(stdClass)#%d (7) { + [u"c1"]=> + unicode(1) "0" + [u"c2"]=> + unicode(5) "35999" + [u"c3"]=> + NULL + [u"c4"]=> + unicode(4) "-500" + [u"c5"]=> + unicode(6) "-32768" + [u"c6"]=> + unicode(1) "0" + [u"c7"]=> + unicode(1) "0" +} +done! \ No newline at end of file diff --git a/ext/mysqli/tests/043.phpt b/ext/mysqli/tests/043.phpt index fb0284e06a..b5038ffb2a 100644 --- a/ext/mysqli/tests/043.phpt +++ b/ext/mysqli/tests/043.phpt @@ -1,18 +1,21 @@ --TEST-- mysqli_bind_param (UPDATE) --SKIPIF-- - + --FILE-- ---EXPECT-- +--EXPECTF-- array(1) { [0]=> string(15) "Rasmus is No. 1" } +done! +--UEXPECF-- +array(1) { + [0]=> + unicode(15) "Rasmus is No. 1" +} +done! \ No newline at end of file diff --git a/ext/mysqli/tests/044.phpt b/ext/mysqli/tests/044.phpt index 28e73a7e09..0a2495b9cf 100644 --- a/ext/mysqli/tests/044.phpt +++ b/ext/mysqli/tests/044.phpt @@ -1,13 +1,16 @@ --TEST-- mysqli_get_server_version --SKIPIF-- - + --FILE-- --EXPECT-- int(1) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/045.phpt b/ext/mysqli/tests/045.phpt index dd491a6977..ca916b0d32 100644 --- a/ext/mysqli/tests/045.phpt +++ b/ext/mysqli/tests/045.phpt @@ -1,14 +1,14 @@ --TEST-- mysqli_bind_result (SHOW) --SKIPIF-- - ---EXPECT-- +--EXPECTF-- array(2) { [0]=> string(4) "port" [1]=> - string(4) "3306" + string(%d) "%s" +} +done! +--UEXPECTF-- +array(2) { + [0]=> + unicode(4) "port" + [1]=> + unicode(%d) "%s" } +done! diff --git a/ext/mysqli/tests/046.phpt b/ext/mysqli/tests/046.phpt index e88348bfa9..9fcf321eef 100644 --- a/ext/mysqli/tests/046.phpt +++ b/ext/mysqli/tests/046.phpt @@ -1,15 +1,18 @@ --TEST-- mysqli_stmt_affected_rows (delete) --SKIPIF-- - + --FILE-- --EXPECT-- bool(true) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/047.phpt b/ext/mysqli/tests/047.phpt index 4b5df98676..a32dd70edf 100644 --- a/ext/mysqli/tests/047.phpt +++ b/ext/mysqli/tests/047.phpt @@ -1,15 +1,18 @@ --TEST-- mysqli_get_metadata --SKIPIF-- - + --FILE-- --EXPECTF-- === fetch_fields === @@ -193,4 +197,160 @@ object(stdClass)#5 (11) { int(253) ["decimals"]=> int(0) -} \ No newline at end of file +} +done! +--UEXPECTF-- +=== fetch_fields === +array(2) { + [0]=> + object(stdClass)#5 (11) { + [u"name"]=> + unicode(3) "foo" + [u"orgname"]=> + unicode(3) "foo" + [u"table"]=> + unicode(13) "test_affected" + [u"orgtable"]=> + unicode(13) "test_affected" + [u"def"]=> + unicode(0) "" + [u"max_length"]=> + int(0) + [u"length"]=> + int(11) + [u"charsetnr"]=> + int(63) + [u"flags"]=> + int(32768) + [u"type"]=> + int(3) + [u"decimals"]=> + int(0) + } + [1]=> + object(stdClass)#6 (11) { + [u"name"]=> + unicode(3) "bar" + [u"orgname"]=> + unicode(3) "bar" + [u"table"]=> + unicode(13) "test_affected" + [u"orgtable"]=> + unicode(13) "test_affected" + [u"def"]=> + unicode(0) "" + [u"max_length"]=> + int(0) + [u"length"]=> + int(%d) + [u"charsetnr"]=> + int(%d) + [u"flags"]=> + int(0) + [u"type"]=> + int(253) + [u"decimals"]=> + int(0) + } +} + +=== fetch_field_direct === +object(stdClass)#6 (11) { + [u"name"]=> + unicode(3) "foo" + [u"orgname"]=> + unicode(3) "foo" + [u"table"]=> + unicode(13) "test_affected" + [u"orgtable"]=> + unicode(13) "test_affected" + [u"def"]=> + unicode(0) "" + [u"max_length"]=> + int(0) + [u"length"]=> + int(%d) + [u"charsetnr"]=> + int(%d) + [u"flags"]=> + int(32768) + [u"type"]=> + int(3) + [u"decimals"]=> + int(0) +} +object(stdClass)#6 (11) { + [u"name"]=> + unicode(3) "bar" + [u"orgname"]=> + unicode(3) "bar" + [u"table"]=> + unicode(13) "test_affected" + [u"orgtable"]=> + unicode(13) "test_affected" + [u"def"]=> + unicode(0) "" + [u"max_length"]=> + int(0) + [u"length"]=> + int(%d) + [u"charsetnr"]=> + int(%d) + [u"flags"]=> + int(0) + [u"type"]=> + int(253) + [u"decimals"]=> + int(0) +} + +=== fetch_field === +object(stdClass)#6 (11) { + [u"name"]=> + unicode(3) "foo" + [u"orgname"]=> + unicode(3) "foo" + [u"table"]=> + unicode(13) "test_affected" + [u"orgtable"]=> + unicode(13) "test_affected" + [u"def"]=> + unicode(0) "" + [u"max_length"]=> + int(0) + [u"length"]=> + int(%d) + [u"charsetnr"]=> + int(%d) + [u"flags"]=> + int(32768) + [u"type"]=> + int(3) + [u"decimals"]=> + int(0) +} +object(stdClass)#5 (11) { + [u"name"]=> + unicode(3) "bar" + [u"orgname"]=> + unicode(3) "bar" + [u"table"]=> + unicode(13) "test_affected" + [u"orgtable"]=> + unicode(13) "test_affected" + [u"def"]=> + unicode(0) "" + [u"max_length"]=> + int(0) + [u"length"]=> + int(%d) + [u"charsetnr"]=> + int(%d) + [u"flags"]=> + int(0) + [u"type"]=> + int(253) + [u"decimals"]=> + int(0) +} +done! \ No newline at end of file diff --git a/ext/mysqli/tests/048.phpt b/ext/mysqli/tests/048.phpt index 1cf5b67894..afd4799b83 100644 --- a/ext/mysqli/tests/048.phpt +++ b/ext/mysqli/tests/048.phpt @@ -1,29 +1,32 @@ --TEST-- -mysqli bind_result (OO-Style) +mysqli bind_result (OO-Style) --SKIPIF-- - + --FILE-- select_db("test"); + $mysql->select_db($db); $mysql->query("DROP TABLE IF EXISTS test_fetch_null"); - $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint, - col3 int, col4 bigint, - col5 float, col6 double, - col7 date, col8 time, - col9 varbinary(10), - col10 varchar(50), - col11 char(20))"); - + $mysql->query("CREATE TABLE test_fetch_null(col1 tinyint, col2 smallint, + col3 int, col4 bigint, + col5 float, col6 double, + col7 date, col8 time, + col9 varbinary(10), + col10 varchar(50), + col11 char(20))"); + $mysql->query("INSERT INTO test_fetch_null(col1,col10, col11) VALUES(1,'foo1', 1000),(2,'foo2', 88),(3,'foo3', 389789)"); $stmt = $mysql->prepare("SELECT col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11 from test_fetch_null"); - $stmt->bind_result($c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11); + $stmt->bind_result($c1, $c2, $c3, $c4, $c5, $c6, $c7, $c8, $c9, $c10, $c11); $stmt->execute(); $stmt->fetch(); @@ -34,8 +37,9 @@ mysqli bind_result (OO-Style) $stmt->close(); $mysql->close(); + print "done!"; ?> ---EXPECT-- +--EXPECTF-- array(11) { [0]=> int(1) @@ -60,3 +64,30 @@ array(11) { [10]=> string(4) "1000" } +done! +--UEXPECTF-- +array(11) { + [0]=> + int(1) + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL + [4]=> + NULL + [5]=> + NULL + [6]=> + NULL + [7]=> + NULL + [8]=> + NULL + [9]=> + unicode(4) "foo1" + [10]=> + unicode(4) "1000" +} +done! \ No newline at end of file diff --git a/ext/mysqli/tests/049.phpt b/ext/mysqli/tests/049.phpt index 4bb5bfef45..5be8b40f3b 100644 --- a/ext/mysqli/tests/049.phpt +++ b/ext/mysqli/tests/049.phpt @@ -1,16 +1,19 @@ --TEST-- -mysql_fetch_row (OO-Style) +mysql_fetch_row (OO-Style) --SKIPIF-- - - + --FILE-- select_db("test"); + $mysql->select_db($db); $result = $mysql->query("SELECT DATABASE()"); $row = $result->fetch_row(); $result->close(); @@ -18,9 +21,17 @@ mysql_fetch_row (OO-Style) var_dump($row); $mysql->close(); + print "done!"; ?> ---EXPECT-- +--EXPECTF-- +array(1) { + [0]=> + string(%d) "%s" +} +done! +--UEXPECTF-- array(1) { [0]=> - string(4) "test" + unicode(%d) "%s" } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/050.phpt b/ext/mysqli/tests/050.phpt index 5f923ccf34..ee1c20322e 100644 --- a/ext/mysqli/tests/050.phpt +++ b/ext/mysqli/tests/050.phpt @@ -1,15 +1,18 @@ --TEST-- -non freed statement test +non freed statement test --SKIPIF-- - + --FILE-- + --FILE-- + --FILE-- + --FILE-- + --FILE-- + --FILE-- + --FILE-- connect($host, $user, $passwd); + $foo->connect($host, $user, $passwd, $db, $port, $socket); $foo->close(); printf("%s\n", $foo->test()); ?> diff --git a/ext/mysqli/tests/057.phpt b/ext/mysqli/tests/057.phpt index a987c72381..1bb17b6961 100644 --- a/ext/mysqli/tests/057.phpt +++ b/ext/mysqli/tests/057.phpt @@ -1,18 +1,21 @@ --TEST-- mysqli_get_metadata --SKIPIF-- - + --FILE-- ---EXPECT-- +--EXPECTF-- +bool(true) +bool(true) +object(mysqli_stmt)#%d (%d) { +} +bool(true) +bool(false) +string(0) "" + +Warning: mysqli_stmt_reset() expects parameter 1 to be mysqli_stmt, boolean given in %s on line %d +NULL Rows: 3 array(1) { [0]=> string(1) "1" } +done! +--UEXPECTF-- +bool(true) +bool(true) +object(mysqli_stmt)#%d (%d) { +} +bool(true) +bool(false) +unicode(0) "" + +Warning: mysqli_stmt_reset() expects parameter 1 to be mysqli_stmt, boolean given in %s on line %d +NULL +Rows: 3 +array(1) { + [0]=> + unicode(1) "1" +} +done! \ No newline at end of file diff --git a/ext/mysqli/tests/058.phpt b/ext/mysqli/tests/058.phpt index 7554d08f68..32a735322d 100644 --- a/ext/mysqli/tests/058.phpt +++ b/ext/mysqli/tests/058.phpt @@ -1,21 +1,24 @@ --TEST-- multiple binds --SKIPIF-- - + --FILE-- ---EXPECT-- +--EXPECTF-- array(4) { [0]=> int(1) @@ -55,3 +59,16 @@ array(4) { [3]=> string(3) "bar" } +done! +--UEXPECTF-- +array(4) { + [0]=> + int(1) + [1]=> + unicode(3) "foo" + [2]=> + int(2) + [3]=> + unicode(3) "bar" +} +done! \ No newline at end of file diff --git a/ext/mysqli/tests/059.phpt b/ext/mysqli/tests/059.phpt index 0bc8a62bbf..b56dc26e2a 100644 --- a/ext/mysqli/tests/059.phpt +++ b/ext/mysqli/tests/059.phpt @@ -1,23 +1,26 @@ --TEST-- sqlmode + bind --SKIPIF-- - + --FILE-- --EXPECT-- string(6) "foobar" +done! +--UEXPECT-- +unicode(6) "foobar" +done! \ No newline at end of file