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