coll_009_func.phpt 946 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. require dirname(__FILE__)."/connect.inc";
  11. $ora_sql = "DROP TYPE
  12. ".$type_name."
  13. ";
  14. $statement = OCIParse($c,$ora_sql);
  15. @OCIExecute($statement);
  16. $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE";
  17. $statement = OCIParse($c,$ora_sql);
  18. OCIExecute($statement);
  19. $coll1 = ocinewcollection($c, $type_name);
  20. $coll2 = ocinewcollection($c, $type_name);
  21. var_dump(oci_collection_append($coll1, "2005-07-28"));
  22. var_dump(oci_collection_assign($coll2, $coll1));
  23. var_dump(oci_collection_element_get($coll2, 0));
  24. echo "Done\n";
  25. require dirname(__FILE__)."/drop_type.inc";
  26. ?>
  27. --EXPECTF--
  28. Warning: oci_collection_append(): OCI-01861: literal does not match format string in %s on line %d
  29. bool(false)
  30. bool(true)
  31. bool(false)
  32. Done