summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-02-29 18:43:03 +0100
committerAnatol Belski <ab@php.net>2016-02-29 18:43:03 +0100
commitd78220fb2c2e6bd7c442063fc15343ba8ff0c3a6 (patch)
tree1c3c34dbedfac4500da2e84efdc8c0e8de2f8081
parentc49d9f06847b35a8b300b02aa8b7329558707168 (diff)
downloadphp-git-d78220fb2c2e6bd7c442063fc15343ba8ff0c3a6.tar.gz
add test for bug #68957
-rw-r--r--ext/pdo_dblib/tests/bug_68957.phpt29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/pdo_dblib/tests/bug_68957.phpt b/ext/pdo_dblib/tests/bug_68957.phpt
new file mode 100644
index 0000000000..3d6e2fd13d
--- /dev/null
+++ b/ext/pdo_dblib/tests/bug_68957.phpt
@@ -0,0 +1,29 @@
+--TEST--
+PDO_DBLIB bug #68957 PDO::query doesn't support several queries
+--SKIPIF--
+<?php
+if (!extension_loaded('pdo_dblib')) die('skip not loaded');
+require dirname(__FILE__) . '/config.inc';
+?>
+--FILE--
+<?php
+require dirname(__FILE__) . '/config.inc';
+
+$query = "declare @myInt int = 1; select @myInt;";
+$stmt = $db->query($query);
+$stmt->nextRowset(); // Added line
+$rows = $stmt->fetchAll();
+print_r($rows);
+
+?>
+--EXPECT--
+Array
+(
+ [0] => Array
+ (
+ [computed0] => 1
+ [0] => 1
+ )
+
+)
+