summaryrefslogtreecommitdiff
path: root/ext/oci8/tests/coll_007.phpt
blob: b3b05a5d9ce5807f418bfd8823603ce09703ca98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--TEST--
collection methods
--SKIPIF--
<?php
$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
require(__DIR__.'/skipif.inc');
?>
--FILE--
<?php

require __DIR__."/connect.inc";
require __DIR__."/create_type.inc";

$coll1 = ocinewcollection($c, $type_name);

var_dump($coll1->size());
var_dump($coll1->max());
var_dump($coll1->trim(3));
var_dump($coll1->append(1));
var_dump($coll1->getElem(0));
var_dump($coll1->assignElem(0,2));

echo "Done\n";

require __DIR__."/drop_type.inc";

?>
--EXPECTF--
int(0)
int(0)

Warning: OCI-Collection::trim(): OCI-22167: given trim size [3] must be less than or equal to [0] in %s on line %d
bool(false)
bool(true)
float(1)
bool(true)
Done