xref: /PHP-7.4/ext/oci8/tests/coll_009.phpt (revision 26dfce7f)
1--TEST--
2collections and wrong dates
3--SKIPIF--
4<?php
5$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
6require(__DIR__.'/skipif.inc');
7?>
8--FILE--
9<?php
10
11require __DIR__."/connect.inc";
12
13$ora_sql = "DROP TYPE
14						".$type_name."
15		   ";
16
17$statement = OCIParse($c,$ora_sql);
18@OCIExecute($statement);
19
20$ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
21
22$statement = OCIParse($c,$ora_sql);
23OCIExecute($statement);
24
25
26$coll1 = ocinewcollection($c, $type_name);
27$coll2 = ocinewcollection($c, $type_name);
28
29var_dump($coll1->append("2005-07-28"));
30
31var_dump($coll2->assign($coll1));
32
33var_dump($coll2->getElem(0));
34
35echo "Done\n";
36
37require __DIR__."/drop_type.inc";
38
39?>
40--EXPECTF--
41Warning: OCI-Collection::append(): OCI-01861: literal does not match format string in %s on line %d
42bool(false)
43bool(true)
44bool(false)
45Done
46