]> granicus.if.org Git - php/commitdiff
new test
authorAntony Dovgal <tony2001@php.net>
Wed, 7 Sep 2005 15:27:09 +0000 (15:27 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 7 Sep 2005 15:27:09 +0000 (15:27 +0000)
ext/oci8/tests/error1.phpt [new file with mode: 0644]

diff --git a/ext/oci8/tests/error1.phpt b/ext/oci8/tests/error1.phpt
new file mode 100644 (file)
index 0000000..a150de8
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+oci_error() when oci_connect() fails
+--SKIPIF--
+<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
+--ENV--
+return "
+ORACLE_HOME=".(isset($_ENV['ORACLE_HOME']) ? $_ENV['ORACLE_HOME'] : '')."
+NLS_LANG=".(isset($_ENV['NLS_LANG']) ? $_ENV['NLS_LANG'] : '')."
+";
+--FILE--
+<?php
+
+var_dump(oci_connect("some", "some", "some"));
+var_dump(oci_error());
+
+echo "Done\n";
+
+?>
+--EXPECTF--
+Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in %s on line %d
+bool(false)
+bool(false)
+Done