1--TEST--
2Pdo\Dblib create through PDO::connect
3--EXTENSIONS--
4pdo_dblib
5--SKIPIF--
6<?php
7require __DIR__ . '/config.inc';
8getDbConnection();
9?>
10--FILE--
11<?php
12
13require __DIR__ . '/config.inc';
14
15$db = connectToDb();
16if (!$db instanceof Pdo\Dblib) {
17    echo "Wrong class type. Should be Pdo\Dblib but is " . get_class($db) . "\n";
18}
19
20$db->query("CREATE TABLE #pdo_dblib_002(name VARCHAR(32))");
21$db->query("INSERT INTO #pdo_dblib_002 VALUES('PHP'), ('PHP6')");
22
23foreach ($db->query('SELECT name FROM #pdo_dblib_002') as $row) {
24    var_dump($row);
25}
26
27echo "Fin.";
28?>
29--CLEAN--
30<?php
31require __DIR__ . '/config.inc';
32$db = getDbConnection();
33$db->query('DROP TABLE IF EXISTS #pdo_dblib_002');
34?>
35--EXPECT--
36array(2) {
37  ["name"]=>
38  string(3) "PHP"
39  [0]=>
40  string(3) "PHP"
41}
42array(2) {
43  ["name"]=>
44  string(4) "PHP6"
45  [0]=>
46  string(4) "PHP6"
47}
48Fin.
49