Annotation of embedaddon/php/ext/pdo_oci/tests/pecl_bug_11345.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: PECL PDO_OCI Bug #11345 (Test invalid character set name)
                      3: --SKIPIF--
                      4: <?php
                      5: if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
                      6: require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
                      7: PDOTest::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: 
                     16: try {
                     17:     $dbh = new PDO('oci:dbname=xxx;charset=yyy', 'abc', 'def');
                     18: } 
                     19: catch (PDOException $e) {
                     20:     echo 'Connection failed: ' . $e->getMessage(). "\n";
                     21:     exit;
                     22: }
                     23: 
                     24: echo "Done\n";
                     25: 
                     26: ?>
                     27: 
                     28: --EXPECTF--
                     29: Connection failed: SQLSTATE[HY000]: OCINlsCharSetNameToId: unknown character set name (%s)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>