1--TEST--
2Pdo\Pgsql getWarningCount
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 =  Pdo::connect($config['ENV']['PDOTEST_DSN']);
18if (!$db instanceof Pdo\Pgsql) {
19    echo "Wrong class type. Should be Pdo\Pgsql but is " . get_class($db) . "\n";
20}
21
22echo $db->escapeIdentifier("This is a quote\"") . "\n";
23
24try {
25    $db->escapeIdentifier("aa\xC3\xC3\xC3");
26} catch (PDOException $e) {
27    echo $e->getMessage() . "\n";
28}
29
30--EXPECT--
31"This is a quote"""
32SQLSTATE[HY000]: General error: 7 incomplete multibyte character
33