Annotation of embedaddon/php/ext/oci8/tests/connect_without_oracle_home.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults)
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded('oci8')) die("skip no oci8 extension");
! 6: ob_start();
! 7: phpinfo(INFO_MODULES);
! 8: $phpinfo = ob_get_clean();
! 9: $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
! 10: if ($ov !== 1) {
! 11: die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
! 12: }
! 13: $iv = preg_match('/Oracle .*Version => (10\.2)/', $phpinfo);
! 14: if ($iv != 1) {
! 15: die ("skip tests a feature that works only with Oracle 10gR2");
! 16: }
! 17: ?>
! 18: --ENV--
! 19: ORACLE_HOME=""
! 20: --FILE--
! 21: <?php
! 22:
! 23: require dirname(__FILE__)."/details.inc";
! 24:
! 25: if (!empty($dbase)) {
! 26: var_dump(oci_connect($user, $password, $dbase));
! 27: }
! 28: else {
! 29: var_dump(oci_connect($user, $password));
! 30: }
! 31:
! 32: ?>
! 33: ===DONE===
! 34: <?php exit(0); ?>
! 35: --EXPECTF--
! 36: Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and %s are set and point to the right directories in %s on line %d
! 37: bool(false)
! 38: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>