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_007.phpt ('DBA DB4 File Creation popen("c") with existing invalid 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_popen($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:
?>
21:

Expected

database handler: db4
int(14)

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

Output

database handler: db4
int(14)

Notice: dba_popen(): /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_007.php on line 9

Warning: dba_popen(/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_007.php on line 9
Error creating /var/php_gcov/PHP_HEAD/ext/dba/tests/test0.dbm

Diff

004+ Notice: dba_popen(): /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_007.php on line 9
005+ 

 

Generated at Tue, 22 Jul 2014 01:33:26 +0000 (4 days ago)

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