xref: /PHP-5.6/ext/oci8/tests/coll_007.phpt (revision c7a8bd6a)
1--TEST--
2collection methods
3--SKIPIF--
4<?php
5$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
6require(dirname(__FILE__).'/skipif.inc');
7?>
8--FILE--
9<?php
10
11require dirname(__FILE__)."/connect.inc";
12require dirname(__FILE__)."/create_type.inc";
13
14$coll1 = ocinewcollection($c, $type_name);
15
16var_dump($coll1->size());
17var_dump($coll1->max());
18var_dump($coll1->trim(3));
19var_dump($coll1->append(1));
20var_dump($coll1->getElem(0));
21var_dump($coll1->assignElem(0,2));
22
23echo "Done\n";
24
25require dirname(__FILE__)."/drop_type.inc";
26
27?>
28--EXPECTF--
29int(0)
30int(0)
31
32Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
33bool(false)
34bool(true)
35float(1)
36bool(true)
37Done
38