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_018.phpt ('Collection trim tests')

Script

1: <?php
2:
3:
require dirname(__FILE__)."/connect.inc";
4: require 
dirname(__FILE__)."/create_type.inc";
5:
6:
$coll1 oci_new_collection($c$type_name);
7:
8: echo 
"Test 1.\n";
9:
var_dump($coll1->trim());
10:
11: echo 
"\nTest 2.\n";
12:
var_dump($coll1->trim(0));
13:
14: echo 
"\nTest 3.\n";
15:
var_dump($coll1->append(1));
16:
var_dump($coll1->append(2));
17:
var_dump($coll1->append(3));
18:
var_dump($coll1->append(4));
19:
20:
var_dump($coll1->getElem(-1));  // check before the beginning
21:
var_dump($coll1->getElem(0));
22:
var_dump($coll1->getElem(1));
23:
var_dump($coll1->getElem(2));
24:
var_dump($coll1->getElem(3));
25:
var_dump($coll1->getElem(4));  // check past the end
26:
27:
echo "\nTest 4.\n";
28:
var_dump($coll1->trim(1));
29:
var_dump($coll1->getElem(2));  // this should be the last element
30:
var_dump($coll1->getElem(3));  // this element should have gone
31:
32:
echo "\nTest 5.\n";
33:
var_dump($coll1->trim(2));
34:
var_dump($coll1->getElem(0));  // this should be the last element
35:
var_dump($coll1->getElem(1));  // this element should have gone
36:
37:
echo "\nTest 6.\n";
38:
var_dump($coll1->trim(0));
39:
var_dump($coll1->getElem(0));  // this should still be the last element
40:
41:
echo "\nTest 7.\n";
42:
var_dump($coll1->trim(1));
43:
var_dump($coll1->getElem(0));  // this should have gone
44:
45:
echo "Done\n";
46:
47: require 
dirname(__FILE__)."/drop_type.inc";
48:
49:
?>
50:

Expected

Test 1.

Warning: OCI-Collection::trim() expects exactly 1 parameter, 0 given in %s on line 9
NULL

Test 2.
bool(true)

Test 3.
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)
float(1)
float(2)
float(3)
float(4)
bool(false)

Test 4.
bool(true)
float(3)
bool(false)

Test 5.
bool(true)
float(1)
bool(false)

Test 6.
bool(true)
float(1)

Test 7.
bool(true)
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:16:58
  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 1.
003- Warning: OCI-Collection::trim() expects exactly 1 parameter, 0 given in %s on line 9
004- NULL
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:16:58
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- Test 2.
007- bool(true)
008- 
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 3.
010- bool(true)
011- bool(true)
012- bool(true)
013- bool(true)
014- bool(false)
015- float(1)
016- float(2)
017- float(3)
018- float(4)
019- bool(false)
020- 
021- Test 4.
022- bool(true)
023- float(3)
024- bool(false)
025- 
026- Test 5.
027- bool(true)
028- float(1)
029- bool(false)
030- 
031- Test 6.
032- bool(true)
033- float(1)
034- 
035- Test 7.
036- bool(true)
037- bool(false)
038- Done

 

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

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