1--TEST--
2Pdo\Pgsql subclass basic
3--EXTENSIONS--
4pdo
5pdo_pgsql
6--SKIPIF--
7<?php
8require __DIR__ . '/config.inc';
9require dirname(__DIR__, 2) . '/pdo/tests/pdo_test.inc';
10PDOTest::skip();
11?>
12--FILE--
13<?php
14
15require_once __DIR__ . "/config.inc";
16
17$db = new Pdo\Pgsql($config['ENV']['PDOTEST_DSN']);
18
19$db->query('CREATE TABLE pdopgsql_001 (id INT, name TEXT)');
20$db->query("INSERT INTO pdopgsql_001 VALUES (NULL, 'PHP'), (NULL, 'PHP6')");
21
22foreach ($db->query('SELECT name FROM pdopgsql_001') as $row) {
23    var_dump($row);
24}
25
26echo "Fin.";
27?>
28--CLEAN--
29<?php
30require __DIR__ . '/../../pdo/tests/pdo_test.inc';
31$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
32$pdo->query("DROP TABLE IF EXISTS pdopgsql_001");
33?>
34--EXPECT--
35array(2) {
36  ["name"]=>
37  string(3) "PHP"
38  [0]=>
39  string(3) "PHP"
40}
41array(2) {
42  ["name"]=>
43  string(4) "PHP6"
44  [0]=>
45  string(4) "PHP6"
46}
47Fin.
48