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

Test Failure Report for ext/mysqli/tests/mysqli_store_result.phpt ('mysqli_store_result()')

Script

1: <?php
2:     
require_once("connect.inc");
3:
4:     
$tmp    NULL;
5:     
$link   NULL;
6:
7:     if (!
is_null($tmp = @mysqli_store_result()))
8:         
printf("[001] Expecting NULL, got %s/%s\n"gettype($tmp), $tmp);
9:
10:     if (!
is_null($tmp = @mysqli_store_result($link)))
11:         
printf("[002] Expecting NULL, got %s/%s\n"gettype($tmp), $tmp);
12:
13:     require(
'table.inc');
14:
15:     if (!
$res mysqli_real_query($link"SELECT id, label FROM test ORDER BY id"))
16:         
printf("[003] [%d] %s\n"mysqli_errno($link), mysqli_error($link));
17:
18:     if (!
is_object($res mysqli_store_result($link)))
19:         
printf("[004] Expecting object, got %s/%s. [%d] %s\n",
20:             
gettype($res), $resmysqli_errno($link), mysqli_error($link));
21:
22:     if (
true !== ($tmp mysqli_data_seek($res2)))
23:         
printf("[005] Expecting boolean/true, got %s/%s. [%d] %s\n",
24:             
gettype($tmp), $tmpmysqli_errno($link), mysqli_error($link));
25:
26:     
mysqli_free_result($res);
27:
28:     if (!
mysqli_query($link"DELETE FROM test"))
29:         
printf("[006] [%d] %s\n"mysqli_errno($link), mysqli_error($link));
30:
31:     if (
false !== ($res mysqli_store_result($link)))
32:         
printf("[007] Expecting boolean/false, got %s/%s. [%d] %s\n",
33:             
gettype($res), $resmysqli_errno($link), mysqli_error($link));
34:
35:     if (!
$res mysqli_query($link"SELECT id, label FROM test ORDER BY id"))
36:         
printf("[008] [%d] %s\n"mysqli_errno($link), mysqli_error($link));
37:
38:     if (
false !== ($tmp mysqli_data_seek($res1)))
39:         
printf("[009] Expecting boolean/false, got %s/%s\n",
40:             
gettype($tmp), $tmp);
41:
42:     
mysqli_close($link);
43:
44:     if (
NULL !== ($tmp mysqli_store_result($link)))
45:         
printf("[010] Expecting NULL, got %s/%s\n"gettype($tmp), $tmp);
46:
47:     print 
"done!";
48:
?>
49:

Expected

Warning: mysqli_store_result(): Couldn't fetch mysqli in %s on line %d
done!

Output

Out of memory

Diff

001+ Out of memory
001- Warning: mysqli_store_result(): Couldn't fetch mysqli in %s on line %d
002- done!

 

Generated at Mon, 27 Nov 2017 05:04:32 +0000 (15 days ago)

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