Annotation of embedaddon/php/ext/oci8/tests/coll_003.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: collection methods
! 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: require dirname(__FILE__)."/create_type.inc";
! 13:
! 14: $coll1 = oci_new_collection($c, $type_name);
! 15:
! 16: var_dump($coll1->size());
! 17: var_dump($coll1->max());
! 18: var_dump($coll1->trim(3));
! 19: var_dump($coll1->append(1));
! 20: var_dump($coll1->getElem(0));
! 21: var_dump($coll1->assignElem(0,2));
! 22:
! 23: echo "Done\n";
! 24:
! 25: require dirname(__FILE__)."/drop_type.inc";
! 26:
! 27: ?>
! 28: --EXPECTF--
! 29: int(0)
! 30: int(0)
! 31:
! 32: Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
! 33: bool(false)
! 34: bool(true)
! 35: float(1)
! 36: bool(true)
! 37: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>