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/dba/tests/dba_db4_003.phpt ('DBA DB4 File Creation open("c") with existing file')

Script

1: <?php
2:
3: $handler 
"db4";
4: require_once(
dirname(__FILE__) .'/test.inc');
5: echo 
"database handler: $handler\n";
6:
7:
var_dump(file_put_contents($db_filename"Dummy contents"));
8:
9: if ((
$db_file dba_open($db_filename"c"$handler)) !== FALSE) {
10:     if (
file_exists($db_filename)) {
11:         echo 
"database file created\n";
12:         
dba_close($db_file);
13:     } else {
14:         echo 
"File did not get created\n";
15:     }
16: } else {
17:     echo 
"Error creating $db_filename\n";
18: }
19:
20:
// Check the file still exists
21:
$s file_get_contents($db_filename);
22: echo 
"$s\n";
23:
24:
?>
25:

Expected

database handler: db4
int(14)

Warning: dba_open(%stest0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in %sdba_db4_003.php on line %d
Error creating %stest0.dbm
Dummy contents

Output

database handler: db4
int(14)

Notice: dba_open(): /var/php_gcov/PHP_HEAD/ext/dba/tests/test0.dbm: unexpected file type or format in /var/php_gcov/PHP_HEAD/ext/dba/tests/dba_db4_003.php on line 9

Warning: dba_open(/var/php_gcov/PHP_HEAD/ext/dba/tests/test0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in /var/php_gcov/PHP_HEAD/ext/dba/tests/dba_db4_003.php on line 9
Error creating /var/php_gcov/PHP_HEAD/ext/dba/tests/test0.dbm
Dummy contents

Diff

004+ Notice: dba_open(): /var/php_gcov/PHP_HEAD/ext/dba/tests/test0.dbm: unexpected file type or format in /var/php_gcov/PHP_HEAD/ext/dba/tests/dba_db4_003.php on line 9
005+ 

 

Generated at Mon, 04 Aug 2014 15:49:20 +0000 (18 days ago)

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