From: Michael Wallner Date: Tue, 17 May 2016 10:13:20 +0000 (+0200) Subject: fix tests X-Git-Tag: v1.1.0~5 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=1b5358df410e66224c7e8251d286134b0f3f59d3;p=m6w6%2Fext-pq fix tests --- diff --git a/tests/async003.phpt b/tests/async003.phpt index 9872642..2e72a9f 100644 --- a/tests/async003.phpt +++ b/tests/async003.phpt @@ -26,13 +26,50 @@ do { DONE --EXPECTF-- Test -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(2) ["statusMessage"]=> string(9) "TUPLES_OK" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(1) ["numCols"]=> @@ -44,13 +81,50 @@ object(pq\Result)#%d (8) { ["autoConvert"]=> int(65535) } -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(2) ["statusMessage"]=> string(9) "TUPLES_OK" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(1) ["numCols"]=> diff --git a/tests/async004.phpt b/tests/async004.phpt index d40cda8..bafc07a 100644 --- a/tests/async004.phpt +++ b/tests/async004.phpt @@ -27,13 +27,50 @@ do { DONE --EXPECTF-- Test -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(2) ["statusMessage"]=> string(9) "TUPLES_OK" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(1) ["numCols"]=> diff --git a/tests/async005.phpt b/tests/async005.phpt index 343992a..6688b27 100644 --- a/tests/async005.phpt +++ b/tests/async005.phpt @@ -36,13 +36,50 @@ complete($s); DONE --EXPECTF-- Test -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(2) ["statusMessage"]=> string(9) "TUPLES_OK" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(1) ["numCols"]=> diff --git a/tests/async006.phpt b/tests/async006.phpt index 775c880..b1bcbb4 100644 --- a/tests/async006.phpt +++ b/tests/async006.phpt @@ -30,13 +30,50 @@ do { DONE --EXPECTF-- Test -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(9) ["statusMessage"]=> string(12) "SINGLE_TUPLE" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(1) ["numCols"]=> @@ -48,13 +85,50 @@ object(pq\Result)#%d (8) { ["autoConvert"]=> int(65535) } -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(9) ["statusMessage"]=> string(12) "SINGLE_TUPLE" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(1) ["numCols"]=> @@ -66,13 +140,50 @@ object(pq\Result)#%d (8) { ["autoConvert"]=> int(65535) } -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(9) ["statusMessage"]=> string(12) "SINGLE_TUPLE" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(1) ["numCols"]=> @@ -84,13 +195,50 @@ object(pq\Result)#%d (8) { ["autoConvert"]=> int(65535) } -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(2) ["statusMessage"]=> string(9) "TUPLES_OK" ["errorMessage"]=> string(0) "" + ["diag"]=> + array(17) { + ["severity"]=> + NULL + ["sqlstate"]=> + NULL + ["message_primary"]=> + NULL + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + NULL + ["source_line"]=> + NULL + ["source_function"]=> + NULL + } ["numRows"]=> int(0) ["numCols"]=> diff --git a/tests/cancel001.phpt b/tests/cancel001.phpt index 5ccdf43..708591f 100644 --- a/tests/cancel001.phpt +++ b/tests/cancel001.phpt @@ -24,13 +24,50 @@ DONE --EXPECTF-- Test bool(true) -object(pq\Result)#%d (8) { +object(pq\Result)#%d (9) { ["status"]=> int(7) ["statusMessage"]=> string(11) "FATAL_ERROR" ["errorMessage"]=> string(47) "ERROR: canceling statement due to user request" + ["diag"]=> + array(17) { + ["severity"]=> + string(5) "ERROR" + ["sqlstate"]=> + string(5) "57014" + ["message_primary"]=> + string(39) "canceling statement due to user request" + ["message_detail"]=> + NULL + ["message_hint"]=> + NULL + ["statement_position"]=> + NULL + ["internal_position"]=> + NULL + ["internal_query"]=> + NULL + ["context"]=> + NULL + ["schema_name"]=> + NULL + ["table_name"]=> + NULL + ["column_name"]=> + NULL + ["datatype_name"]=> + NULL + ["constraint_name"]=> + NULL + ["source_file"]=> + string(10) "postgres.c" + ["source_line"]=> + string(4) "2988" + ["source_function"]=> + string(17) "ProcessInterrupts" + } ["numRows"]=> int(0) ["numCols"]=> diff --git a/tests/res001.phpt b/tests/res001.phpt index d42524a..b2a3667 100644 --- a/tests/res001.phpt +++ b/tests/res001.phpt @@ -58,13 +58,19 @@ Warning: pq\Result not initialized in %s on line %d Warning: pq\Result not initialized in %s on line %d Warning: pq\Result not initialized in %s on line %d -object(pq\Result)#%d (8) { + +Warning: pq\Result not initialized in %s on line %d + +Warning: pq\Result not initialized in %s on line %d +object(pq\Result)#%d (9) { ["status"]=> NULL ["statusMessage"]=> NULL ["errorMessage"]=> NULL + ["diag"]=> + NULL ["numRows"]=> int(0) ["numCols"]=> @@ -76,7 +82,7 @@ object(pq\Result)#%d (8) { ["autoConvert"]=> int(65535) } -array(9) { +array(10) { ["dummy"]=> int(2) ["status"]=> @@ -85,6 +91,8 @@ array(9) { NULL ["errorMessage"]=> NULL + ["diag"]=> + NULL ["numRows"]=> int(0) ["numCols"]=>