mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Most oci8 tests fail out-of-the-box because a typical host won't have an Oracle database instance available. Other database drivers like mysqli and pgsql address this problem with an include file, inserted into SKIPIF, that skips the test if no connection at all can be made. This commits adds such a file (skipifconnectfailure.inc) for oci8, and adds the corresponding SKIPIF to any tests that connect to a database. Closes GH-11804 * ext/oci8/tests/lob_aliases.phpt: drop unnecessary SKIPIF.
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
--TEST--
|
|
Bind with various bind types not supported by TimesTen
|
|
--EXTENSIONS--
|
|
oci8
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipifconnectfailure.inc');
|
|
$target_dbs = array('oracledb' => false, 'timesten' => true); // test runs on these DBs
|
|
require(__DIR__.'/skipif.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
require(__DIR__.'/connect.inc');
|
|
|
|
$types = array(
|
|
"SQLT_CLOB" => SQLT_CLOB,
|
|
"SQLT_BLOB" => SQLT_BLOB,
|
|
"OCI_B_CLOB" => OCI_B_CLOB,
|
|
"OCI_B_BLOB" => OCI_B_BLOB,
|
|
);
|
|
|
|
foreach ($types as $t => $v) {
|
|
|
|
echo "Test - $t\n";
|
|
|
|
$s = oci_parse($c, "select * from dual where dummy = :c1");
|
|
$c1 = "Doug";
|
|
oci_bind_by_name($s, ":c1", $c1, -1, $v);
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Test - SQLT_CLOB
|
|
|
|
Warning: oci_bind_by_name(): Unable to find descriptor property in %sbind_unsupported_3.php on line %d
|
|
Test - SQLT_BLOB
|
|
|
|
Warning: oci_bind_by_name(): Unable to find descriptor property in %sbind_unsupported_3.php on line %d
|
|
Test - OCI_B_CLOB
|
|
|
|
Warning: oci_bind_by_name(): Unable to find descriptor property in %sbind_unsupported_3.php on line %d
|
|
Test - OCI_B_BLOB
|
|
|
|
Warning: oci_bind_by_name(): Unable to find descriptor property in %sbind_unsupported_3.php on line %d
|