From b0251ed6cc67939691fa6c34575976cb201c6998 Mon Sep 17 00:00:00 2001 From: Ulf Wendel Date: Thu, 12 Jul 2007 20:53:05 +0000 Subject: [PATCH] Connection parameter should be taken from connect.inc and used all in mysqli_connect() and friends. Use UEXPECTF instead of crippled EXPECTF. --- ext/mysqli/tests/030.phpt | 6 ++++-- ext/mysqli/tests/031.phpt | 16 +++++++++++----- ext/mysqli/tests/032.phpt | 13 +++++++++---- ext/mysqli/tests/033.phpt | 9 +++++++-- ext/mysqli/tests/034.phpt | 6 ++++-- ext/mysqli/tests/035.phpt | 6 ++++-- ext/mysqli/tests/036.phpt | 18 ++++++++++-------- ext/mysqli/tests/037.phpt | 12 +++++++----- ext/mysqli/tests/038.phpt | 4 ++-- ext/mysqli/tests/039.phpt | 6 ++++-- 10 files changed, 62 insertions(+), 34 deletions(-) diff --git a/ext/mysqli/tests/030.phpt b/ext/mysqli/tests/030.phpt index a3946c3715..cd48edc312 100644 --- a/ext/mysqli/tests/030.phpt +++ b/ext/mysqli/tests/030.phpt @@ -7,19 +7,21 @@ function test: mysqli_errno include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd); + $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); $errno = mysqli_errno($link); var_dump($errno); mysqli_select_db($link, "test"); mysqli_query($link, "select * from non_exisiting_table"); - $errno = mysqli_errno($link); + $errno = mysqli_errno($link); var_dump($errno); mysqli_close($link); + print "done!"; ?> --EXPECT-- int(0) int(1146) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/031.phpt b/ext/mysqli/tests/031.phpt index 4e1e35f4ee..9ece3830da 100644 --- a/ext/mysqli/tests/031.phpt +++ b/ext/mysqli/tests/031.phpt @@ -7,19 +7,25 @@ function test: mysqli_error include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd); + $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); $error = mysqli_error($link); var_dump($error); - mysqli_select_db($link, "test"); + mysqli_select_db($link, $db); mysqli_query($link, "select * from non_exisiting_table"); - $error = mysqli_error($link); + $error = mysqli_error($link); var_dump($error); mysqli_close($link); + print "done!"; ?> --EXPECTF-- -%s(0) "" -%s(46) "Table 'test.non_exisiting_table' doesn't exist" +string(0) "" +string(%d) "%s" +done! +--UEXPECTF-- +unicode(0) "" +unicode(%d) "%s" +done! \ No newline at end of file diff --git a/ext/mysqli/tests/032.phpt b/ext/mysqli/tests/032.phpt index f210869b92..d398b3703f 100644 --- a/ext/mysqli/tests/032.phpt +++ b/ext/mysqli/tests/032.phpt @@ -5,11 +5,11 @@ function test: mysqli_info --FILE-- --EXPECTF-- -%s(38) "Records: 3 Duplicates: 0 Warnings: 0" +string(38) "Records: 3 Duplicates: 0 Warnings: 0" +done! +--UEXPECTF-- +unicode(38) "Records: 3 Duplicates: 0 Warnings: 0" +done! \ No newline at end of file diff --git a/ext/mysqli/tests/033.phpt b/ext/mysqli/tests/033.phpt index de401f49de..fff4be4d3a 100644 --- a/ext/mysqli/tests/033.phpt +++ b/ext/mysqli/tests/033.phpt @@ -6,15 +6,20 @@ function test: mysqli_get_host_info --FILE-- --EXPECTF-- string(%d) "%s via %s" +done! +--UEXPECTF-- +unicode(%d) "%s via %s" +done! \ No newline at end of file diff --git a/ext/mysqli/tests/034.phpt b/ext/mysqli/tests/034.phpt index 468861c3c2..a381ecad82 100644 --- a/ext/mysqli/tests/034.phpt +++ b/ext/mysqli/tests/034.phpt @@ -6,15 +6,17 @@ function test: mysqli_get_proto_info --FILE-- --EXPECT-- int(10) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/035.phpt b/ext/mysqli/tests/035.phpt index ea31222ec7..0eeb5bfea3 100644 --- a/ext/mysqli/tests/035.phpt +++ b/ext/mysqli/tests/035.phpt @@ -5,15 +5,17 @@ function test: mysqli_get_server_info --FILE-- --EXPECT-- int(1) +done! \ No newline at end of file diff --git a/ext/mysqli/tests/036.phpt b/ext/mysqli/tests/036.phpt index 057795bb4c..f1a2114352 100644 --- a/ext/mysqli/tests/036.phpt +++ b/ext/mysqli/tests/036.phpt @@ -1,7 +1,7 @@ --TEST-- function test: mysqli_insert_id() --SKIPIF-- - --EXPECT-- array(2) { @@ -49,3 +50,4 @@ array(2) { [1]=> bool(true) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/037.phpt b/ext/mysqli/tests/037.phpt index c9089c19be..f1aa63e84a 100644 --- a/ext/mysqli/tests/037.phpt +++ b/ext/mysqli/tests/037.phpt @@ -6,11 +6,11 @@ function test: mysqli_field_count() --EXPECT-- array(2) { @@ -34,3 +35,4 @@ array(2) { [1]=> int(2) } +done! \ No newline at end of file diff --git a/ext/mysqli/tests/038.phpt b/ext/mysqli/tests/038.phpt index ecd4f908f1..0e4fb435c9 100644 --- a/ext/mysqli/tests/038.phpt +++ b/ext/mysqli/tests/038.phpt @@ -8,9 +8,9 @@ function test: mysqli_num_fields() include "connect.inc"; /*** test mysqli_connect 127.0.0.1 ***/ - $link = mysqli_connect($host, $user, $passwd); + $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); - mysqli_select_db($link, "test"); + mysqli_select_db($link, $db); mysqli_query($link, "DROP TABLE IF EXISTS test_result"); diff --git a/ext/mysqli/tests/039.phpt b/ext/mysqli/tests/039.phpt index 1d5ab99106..805b2aadff 100644 --- a/ext/mysqli/tests/039.phpt +++ b/ext/mysqli/tests/039.phpt @@ -6,9 +6,9 @@ function test: mysqli_num_fields() 2 --EXPECT-- int(2) +done! \ No newline at end of file -- 2.40.0