1--TEST--
2PECL PDO_OCI Bug #11345 (Test invalid character set name)
3--EXTENSIONS--
4pdo
5pdo_oci
6--SKIPIF--
7<?php
8require(__DIR__.'/../../pdo/tests/pdo_test.inc');
9PDOTest::skip();
10?>
11--FILE--
12<?php
13
14// This tests only part of PECL bug 11345.  The other part - testing
15// when the National Language Support (NLS) environment can't be
16// initialized - is very difficult to test portably.
17
18try {
19    $dbh = new PDO('oci:dbname=xxx;charset=yyy', 'abc', 'def');
20}
21catch (PDOException $e) {
22    echo 'Connection failed: ' . $e->getMessage(). "\n";
23    exit;
24}
25
26echo "Done\n";
27
28?>
29--EXPECTF--
30Connection failed: SQLSTATE[HY000]: OCINlsCharSetNameToId: unknown character set name (%s)
31