From 90e220721f80a289fc3b6aa282fb57ce18cadce7 Mon Sep 17 00:00:00 2001 From: Jenny Tam Date: Wed, 5 Jun 2019 15:58:33 -0700 Subject: [PATCH] Added a new test and modify a non LOB sqlsrv test --- .../pdo_sqlsrv/pdo_test_non_LOB_types.phpt | 78 ++++++++++++++++++ .../sqlsrv/test_sqlsrv_phptype_stream.phpt | Bin 10383 -> 10421 bytes 2 files changed, 78 insertions(+) create mode 100644 test/functional/pdo_sqlsrv/pdo_test_non_LOB_types.phpt diff --git a/test/functional/pdo_sqlsrv/pdo_test_non_LOB_types.phpt b/test/functional/pdo_sqlsrv/pdo_test_non_LOB_types.phpt new file mode 100644 index 000000000..1c287d9ac --- /dev/null +++ b/test/functional/pdo_sqlsrv/pdo_test_non_LOB_types.phpt @@ -0,0 +1,78 @@ +--TEST-- +Test reading non LOB types +--DESCRIPTION-- +A simpler version of sqlsrv test "test_sqlsrv_phptype_stream.phpt" for reading from +pre-populated tables [test_streamable_types] and [test_types] +--SKIPIF-- + +--FILE-- +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + + // test the allowed non LOB column types + $tsql = "SELECT [char_short_type], [varchar_short_type], [nchar_short_type], [nvarchar_short_type], [binary_short_type], [varbinary_short_type] FROM [test_streamable_types]"; + $stmt = $conn->query($tsql); + + $result = $stmt->fetch(PDO::FETCH_NUM); + verifyResult($result); + + // test not streamable types + $tsql = "SELECT * FROM [test_types]"; + $stmt = $conn->query($tsql); + $result = $stmt->fetch(PDO::FETCH_NUM); + print_r($result); + +} catch (PDOException $e) { + var_dump($e->errorInfo); +} + +unset($stmt); +unset($conn); + +?> +--EXPECT-- +Array +( + [0] => 9223372036854775807 + [1] => 2147483647 + [2] => 32767 + [3] => 255 + [4] => 1 + [5] => 9999999999999999999999999999999999999 + [6] => 922337203685477.5807 + [7] => 214748.3647 + [8] => 1.79E+308 + [9] => 1.1799999E-38 + [10] => 1968-12-12 16:20:00.000 + [11] => +) \ No newline at end of file diff --git a/test/functional/sqlsrv/test_sqlsrv_phptype_stream.phpt b/test/functional/sqlsrv/test_sqlsrv_phptype_stream.phpt index cdf1453510012a233933bed64095435bb02bffb6..908e5d4d4766b54a2d0dc2aca64ad26053a4983d 100644 GIT binary patch delta 143 zcmeAV+!{FHbG?STZ*g#HNoj#zW?r(orZq2@0uZPq=jY`q*eVnk<`fr|#e;aM$t4;p z#i>PQsYN;vd7wyUex82;h%AQb%uLgO>9)01NK4EqPF2uUsD>B|GCD1>Br(Ues3^Zk RL&+_1vLB<&<_t!4bpT!QERg^J delta 80 zcmdlQ*dI9IvqOA-UUI62l5eqder|4lo?d2NvXZ7XFBdPD0uZPq=jY`q*eZai)Z`Kk YkPJvXGfhE55iB`5oY8#q1V&YL02_4|)c^nh