Annotation of embedaddon/php/ext/oci8/tests/coll_009_func.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: collections and wrong dates
                      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: $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);
                     23: OCIExecute($statement);
                     24: 
                     25: 
                     26: $coll1 = ocinewcollection($c, $type_name);
                     27: $coll2 = ocinewcollection($c, $type_name);
                     28: 
                     29: var_dump(oci_collection_append($coll1, "2005-07-28"));
                     30: 
                     31: var_dump(oci_collection_assign($coll2, $coll1));
                     32: 
                     33: var_dump(oci_collection_element_get($coll2, 0));
                     34: 
                     35: echo "Done\n";
                     36: 
                     37: require dirname(__FILE__)."/drop_type.inc";
                     38: 
                     39: ?>
                     40: --EXPECTF--
                     41: Warning: oci_collection_append(): OCI-01861: literal does not match format string in %s on line %d
                     42: bool(false)
                     43: bool(true)
                     44: bool(false)
                     45: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>