com php-src: add test for bug #68957: ext/pdo_dblib/tests/bug _68957.phpt
| From: | Anatol Belski | Date: | Mon, 29 Feb 2016 17:43:03 +0000 |
| Subject: | com php-src: add test for bug #68957: ext/pdo_dblib/tests/bug _68957.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91195@lists.php.net to get a copy of this message | ||
Commit: d78220fb2c2e6bd7c442063fc15343ba8ff0c3a6
Author: Anatol Belski <ab@php.net> Mon, 29 Feb 2016 18:43:03 +0100
Parents: c49d9f06847b35a8b300b02aa8b7329558707168
Branches: PHP-5.6 PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d78220fb2c2e6bd7c442063fc15343ba8ff0c3a6
Log:
add test for bug #68957
Bugs:
https://bugs.php.net/68957
Changed paths:
A ext/pdo_dblib/tests/bug_68957.phpt
Diff:
diff --git a/ext/pdo_dblib/tests/bug_68957.phpt b/ext/pdo_dblib/tests/bug_68957.phpt
new file mode 100644
index 0000000..3d6e2fd
--- /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
+ )
+
+)
+