Annotation of embedaddon/php/ext/oci8/tests/lob_028.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test descriptor types for oci_new_descriptor()
! 3: --SKIPIF--
! 4: <?php
! 5: $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
! 6: require(dirname(__FILE__).'/skipif.inc');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10:
! 11: require dirname(__FILE__).'/connect.inc';
! 12:
! 13: // Successful statements
! 14:
! 15: $d = oci_new_descriptor($c, OCI_D_FILE);
! 16: var_dump($d);
! 17:
! 18: $d = oci_new_descriptor($c, OCI_DTYPE_FILE);
! 19: var_dump($d);
! 20:
! 21: $d = oci_new_descriptor($c, OCI_D_LOB);
! 22: var_dump($d);
! 23:
! 24: $d = oci_new_descriptor($c, OCI_DTYPE_LOB);
! 25: var_dump($d);
! 26:
! 27: $d = oci_new_descriptor($c, OCI_D_ROWID);
! 28: var_dump($d);
! 29:
! 30: $d = oci_new_descriptor($c, OCI_DTYPE_ROWID);
! 31: var_dump($d);
! 32:
! 33: // Unsuccessful statements
! 34:
! 35: $d = oci_new_descriptor($c, OCI_B_CLOB);
! 36: var_dump($d);
! 37:
! 38: $d = oci_new_descriptor($c, OCI_B_CLOB);
! 39: var_dump($d);
! 40:
! 41: $d = oci_new_descriptor($c, OCI_DEFAULT);
! 42: var_dump($d);
! 43:
! 44: $d = oci_new_descriptor($c, 1);
! 45: var_dump($d);
! 46:
! 47: echo "Done\n";
! 48:
! 49: ?>
! 50: --EXPECTF--
! 51: object(OCI-Lob)#%d (1) {
! 52: ["descriptor"]=>
! 53: resource(%d) of type (oci8 descriptor)
! 54: }
! 55: object(OCI-Lob)#%d (1) {
! 56: ["descriptor"]=>
! 57: resource(%d) of type (oci8 descriptor)
! 58: }
! 59: object(OCI-Lob)#%d (1) {
! 60: ["descriptor"]=>
! 61: resource(%d) of type (oci8 descriptor)
! 62: }
! 63: object(OCI-Lob)#%d (1) {
! 64: ["descriptor"]=>
! 65: resource(%d) of type (oci8 descriptor)
! 66: }
! 67: object(OCI-Lob)#%d (1) {
! 68: ["descriptor"]=>
! 69: resource(%d) of type (oci8 descriptor)
! 70: }
! 71: object(OCI-Lob)#%d (1) {
! 72: ["descriptor"]=>
! 73: resource(%d) of type (oci8 descriptor)
! 74: }
! 75:
! 76: Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
! 77: NULL
! 78:
! 79: Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
! 80: NULL
! 81:
! 82: Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
! 83: NULL
! 84:
! 85: Warning: oci_new_descriptor(): Unknown descriptor type %d in %s on line %d
! 86: NULL
! 87: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>