diff options
| author | Ulf Wendel <uw@php.net> | 2011-01-17 13:06:44 +0000 |
|---|---|---|
| committer | Ulf Wendel <uw@php.net> | 2011-01-17 13:06:44 +0000 |
| commit | a55e03aaffd8601f3b66c0f16451404b61a2f18b (patch) | |
| tree | 94c2f0a843947eaa39cc441088402b0e7673b9c7 | |
| parent | 5ba90aefb086c0d93626607998b6a7b39a8d055f (diff) | |
| download | php-git-a55e03aaffd8601f3b66c0f16451404b61a2f18b.tar.gz | |
Fix tests: don't expect people to use a certain db/schema for testing
| -rw-r--r-- | ext/mysqli/tests/047.phpt | 24 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_fetch_field.phpt | 24 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_fetch_field_direct.phpt | 4 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt | 6 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_fetch_field_oo.phpt | 12 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_fetch_fields.phpt | 12 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_field_seek.phpt | 14 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_field_tell.phpt | 4 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt | 12 | ||||
| -rw-r--r-- | ext/mysqli/tests/mysqli_stmt_result_metadata.phpt | 4 |
10 files changed, 62 insertions, 54 deletions
diff --git a/ext/mysqli/tests/047.phpt b/ext/mysqli/tests/047.phpt index 3e48f0e343..178a1aeba8 100644 --- a/ext/mysqli/tests/047.phpt +++ b/ext/mysqli/tests/047.phpt @@ -72,9 +72,9 @@ array(2) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -101,9 +101,9 @@ array(2) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -132,9 +132,9 @@ object(stdClass)#6 (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -160,9 +160,9 @@ object(stdClass)#6 (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -190,9 +190,9 @@ object(stdClass)#6 (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -218,9 +218,9 @@ object(stdClass)#5 (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt index 92c1e648aa..d1d358b342 100644 --- a/ext/mysqli/tests/mysqli_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field.phpt @@ -44,6 +44,10 @@ require_once('skipifconnectfailure.inc'); $charsets['results']['maxlen'], $tmp->max_length); } + if ($tmp->db != $db) { + printf("011] Expecting database '%s' got '%s'\n", + $db, $tmp->db); + } var_dump(mysqli_fetch_field($res)); @@ -87,13 +91,13 @@ object(stdClass)#%d (13) { [%u|b%"table"]=> %unicode|string%(4) "TEST" [%u|b%"orgtable"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> @@ -115,13 +119,13 @@ object(stdClass)#%d (13) { [%u|b%"table"]=> %unicode|string%(4) "TEST" [%u|b%"orgtable"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(%d) [%u|b%"length"]=> @@ -148,15 +152,15 @@ object(stdClass)#%d (13) { [%u|b%"orgname"]=> %unicode|string%(2) "id" [%u|b%"table"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"orgtable"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt index bfccea657c..fb34e44a6a 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt @@ -59,9 +59,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(%d) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt index b52401b66d..9d511aa900 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt @@ -64,13 +64,13 @@ object(stdClass)#%d (13) { [%u|b%"table"]=> %unicode|string%(4) "TEST" [%u|b%"orgtable"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(%d) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index ad13d46816..2d5ad261b1 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -47,6 +47,10 @@ require_once('skipifconnectfailure.inc'); $charsets['results']['maxlen'], $tmp->max_length); } + if ($tmp->db != $db) { + printf("008] Expecting database '%s' got '%s'\n", + $db, $tmp->db); + } var_dump($res->fetch_field()); @@ -75,9 +79,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> @@ -103,9 +107,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(%d) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt index 1426bb325f..479c71cbbc 100644 --- a/ext/mysqli/tests/mysqli_fetch_fields.phpt +++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt @@ -68,13 +68,13 @@ object(stdClass)#%d (13) { [%u|b%"table"]=> %unicode|string%(4) "TEST" [%u|b%"orgtable"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> @@ -96,13 +96,13 @@ object(stdClass)#%d (13) { [%u|b%"table"]=> %unicode|string%(4) "TEST" [%u|b%"orgtable"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(1) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt index ee6e11cff9..a747bdfa01 100644 --- a/ext/mysqli/tests/mysqli_field_seek.phpt +++ b/ext/mysqli/tests/mysqli_field_seek.phpt @@ -134,9 +134,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -163,9 +163,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -192,9 +192,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(%d) [%u|b%"length"]=> @@ -231,7 +231,7 @@ object(stdClass)#3 (13) { [%u|b%"db"]=> %unicode|string%(0) "" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt index a31b93529a..cac2001acf 100644 --- a/ext/mysqli/tests/mysqli_field_tell.phpt +++ b/ext/mysqli/tests/mysqli_field_tell.phpt @@ -76,9 +76,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt index 1c2b49d169..afaccaf3c7 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt @@ -73,9 +73,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -101,9 +101,9 @@ object(stdClass)#%d (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(%d) [%u|b%"length"]=> @@ -131,7 +131,7 @@ object(stdClass)#%d (13) { [%u|b%"db"]=> %unicode|string%(0) "" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> @@ -159,7 +159,7 @@ object(stdClass)#%d (13) { [%u|b%"db"]=> %unicode|string%(0) "" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(%d) [%u|b%"length"]=> diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt index bd742a2163..a38706f1a1 100644 --- a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt +++ b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt @@ -113,9 +113,9 @@ object(stdClass)#5 (13) { [%u|b%"def"]=> %unicode|string%(0) "" [%u|b%"db"]=> - %unicode|string%(4) "test" + %unicode|string%(%d) "%s" [%u|b%"catalog"]=> - %unicode|string%(3) "def" + %unicode|string%(%d) "%s" [%u|b%"max_length"]=> int(0) [%u|b%"length"]=> |
