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/imap/tests/imap_fetchstructure_basic.phpt ('imap_fetchstructure() function : basic functionality')

Script

1: <?php
2:
echo "Checking with no parameters\n";
3:
imap_fetchstructure();
4:
5: echo  
"Checking with incorrect parameter type\n";
6:
imap_fetchstructure('');
7:
imap_fetchstructure(false);
8:
9: require_once(
dirname(__FILE__).'/imap_include.inc');
10:
$stream_id setup_test_mailbox(''1);
11:
12:
imap_fetchstructure($stream_id);
13:
imap_fetchstructure($stream_id,0);
14:
15:
$z imap_fetchstructure($stream_id,1);
16:
17:
18:
$fields = array('type','encoding','ifsubtype','subtype',
19:
'ifdescription','lines','bytes','parameters');
20:
21: foreach (
$fields as $key) {
22:     
var_dump(isset($z->$key));
23: }
24:
var_dump($z->type);
25:
var_dump($z->encoding);
26:
var_dump($z->bytes);
27:
var_dump($z->lines);
28:
var_dump(is_object($z->parameters));
29:
30:
imap_close($stream_id);
31:
?>
32:

Expected

Checking with no parameters

Warning: imap_fetchstructure() expects at least 2 parameters, 0 given in %s on line %d
Checking with incorrect parameter type

Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d

Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
Create a temporary mailbox and add 1 msgs
.. mailbox '{%s}%s' created

Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
int(%d)
int(%d)
int(%d)
int(%d)
bool(true)

Output

Checking with no parameters

Warning: imap_fetchstructure() expects at least 2 parameters, 0 given in /var/php_gcov/PHP_5_6/ext/imap/tests/imap_fetchstructure_basic.php on line 3
Checking with incorrect parameter type

Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in /var/php_gcov/PHP_5_6/ext/imap/tests/imap_fetchstructure_basic.php on line 6

Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in /var/php_gcov/PHP_5_6/ext/imap/tests/imap_fetchstructure_basic.php on line 7
Create a temporary mailbox and add 1 msgs
.. mailbox '{localhost/norsh}INBOX.phpttest' created

Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in /var/php_gcov/PHP_5_6/ext/imap/tests/imap_fetchstructure_basic.php on line 12
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
int(0)
int(0)
int(42)
int(1)
bool(false)

Diff

025+ bool(false)
025- bool(true)

 

Generated at Thu, 20 Nov 2014 12:38:44 +0000 (8 days ago)

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