PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/oci8/tests/coll_019.phpt ('Test collection Oracle error handling collections and numbers (2)')

Script

1: <?php
2:
3:
require dirname(__FILE__)."/connect.inc";
4:
5:
$ora_sql "DROP TYPE ".$type_name;
6:
$statement oci_parse($c,$ora_sql);
7: @
oci_execute($statement);
8:
9:
10: echo 
"Test 0\n";
11:
$ora_sql "CREATE TYPE ".$type_name." AS TABLE OF BLOB";
12:
$statement oci_parse($c,$ora_sql);
13:
oci_execute($statement);
14:
15:
$coll1 oci_new_collection($c$type_name);
16:
17:
var_dump($coll1->append('a long string'));              // invalid type for append
18:
var_dump($coll1->assignElem(1'a long string'));     // invalid type for assignelem()
19:
var_dump($coll1->getElem(0));
20:
21: require 
dirname(__FILE__)."/drop_type.inc";
22:
23: echo 
"Test 1\n";
24:
$ora_sql "CREATE TYPE ".$type_name." AS TABLE OF NUMBER";
25:
$statement oci_parse($c,$ora_sql);
26:
oci_execute($statement);
27:
28:
$coll1 oci_new_collection($c$type_name);
29:
30:
var_dump($coll1->assignElem(1null));            // invalid location for null
31:
var_dump($coll1->getElem(0));
32:
33: echo 
"Test 2\n";
34:
var_dump($coll1->assignElem(11234));          // invalid location for number
35:
var_dump($coll1->getElem(0));
36:
37: require 
dirname(__FILE__)."/drop_type.inc";
38:
39: echo 
"Test 3\n";
40:
$ora_sql "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR2(1)";
41:
$statement oci_parse($c,$ora_sql);
42:
oci_execute($statement);
43:
44:
$coll1 oci_new_collection($c$type_name);
45:
46:
var_dump($coll1->assignElem(1'abc'));         // invalid location for string
47:
var_dump($coll1->getElem(0));
48:
49: require 
dirname(__FILE__)."/drop_type.inc";
50:
51: echo 
"Test 4\n";
52:
$ora_sql "CREATE TYPE ".$type_name." AS TABLE OF DATE";
53:
$statement oci_parse($c,$ora_sql);
54:
oci_execute($statement);
55:
56:
$coll1 oci_new_collection($c$type_name);
57:
58:
var_dump($coll1->append(1));                           // invalid date format
59:
var_dump($coll1->assignElem(1'01-JAN-06'));          // invalid location for date
60:
var_dump($coll1->getElem(0));
61:
62: require 
dirname(__FILE__)."/drop_type.inc";
63:
64: echo 
"Done\n";
65:
66:
?>
67:

Expected

Test 0

Notice: OCI-Collection::append(): Unknown or unsupported type of element: 113 in %s on line %d
bool(false)

Notice: OCI-Collection::assignelem(): Unknown or unsupported type of element: 113 in %s on line %d
bool(false)
bool(false)
Test 1

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Test 2

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Test 3

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Test 4

Warning: OCI-Collection::append(): OCI-01840: input value not long enough for date format in %s on line %d
bool(false)

Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
bool(false)
bool(false)
Done

Output

***********************************************************************
Fatal NI connect error 12541, connecting to:
 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))

  VERSION INFORMATION:
	TNS for Linux: Version 11.2.0.2.0 - Beta
	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
  Time: 17-JUN-2018 05:17:13
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12541
    TNS-12541: TNS:no listener
    ns secondary err code: 12560
    nt main err code: 511
    TNS-00511: No listener

Fatal error: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
    nt secondary err code: 111
    nt OS err code: 0

Diff

001+ ***********************************************************************
002+ Fatal NI connect error 12541, connecting to:
003+  (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
001- Test 0
003- Notice: OCI-Collection::append(): Unknown or unsupported type of element: 113 in %s on line %d
004- bool(false)
005+   VERSION INFORMATION:
006+ 	TNS for Linux: Version 11.2.0.2.0 - Beta
007+ 	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
008+   Time: 17-JUN-2018 05:17:13
009+   Tracing not turned on.
010+   Tns error struct:
011+     ns main err code: 12541
012+     TNS-12541: TNS:no listener
013+     ns secondary err code: 12560
014+     nt main err code: 511
015+     TNS-00511: No listener
006- Notice: OCI-Collection::assignelem(): Unknown or unsupported type of element: 113 in %s on line %d
007- bool(false)
008- bool(false)
017+ Fatal error: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
018+     nt secondary err code: 111
019+     nt OS err code: 0
009- Test 1
010- 
011- Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
012- bool(false)
013- bool(false)
014- Test 2
015- 
016- Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
017- bool(false)
018- bool(false)
019- Test 3
020- 
021- Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
022- bool(false)
023- bool(false)
024- Test 4
025- 
026- Warning: OCI-Collection::append(): OCI-01840: input value not long enough for date format in %s on line %d
027- bool(false)
028- 
029- Warning: OCI-Collection::assignelem(): OCI-22165: given index [1] must be in the range of %s in %s on line %d
030- bool(false)
031- bool(false)
032- Done

 

Generated at Mon, 18 Jun 2018 17:33:50 +0000 (24 hours ago)

Copyright © 2005-2018 The PHP Group
All rights reserved.