Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / php / ext / imap / tests / imap_fetch_overview_variation4.phpt
bloba5c26663107ed7f011ae89397341be3bbbcecc1c
1 --TEST--
2 Test imap_fetch_overview() function : usage variations - different resources as $stream_id
3 --SKIPIF--
4 <?php
5 extension_loaded('imap') or die('skip imap extension not available in this build');
6 ?>
7 --FILE--
8 <?php
9 /* Prototype  : array imap_fetch_overview(resource $stream_id, int $msg_no [, int $options])
10  * Description: Read an overview of the information in the headers 
11  * of the given message sequence 
12  * Source code: ext/imap/php_imap.c
13  */
16  * Pass different resource types to imap_fetch_overview() to test behaviour
17  */
19 echo "*** Testing imap_fetch_overview() : usage variations ***\n";
21 echo "\n-- File Resource opened with fopen() --\n";
22 var_dump($file_pointer = fopen(__FILE__, 'r+'));
23 var_dump(imap_fetch_overview($file_pointer, 1));
24 fclose($file_pointer);
26 echo "\n-- Directory Resource opened with opendir() --\n";
27 var_dump($dir_handle = opendir(dirname(__FILE__)));
28 var_dump(imap_fetch_overview($dir_handle, 1));
29 closedir($dir_handle);
31 ===DONE===
32 --EXPECTF--
33 *** Testing imap_fetch_overview() : usage variations ***
35 -- File Resource opened with fopen() --
36 resource(%d) of type (stream)
38 Warning: imap_fetch_overview(): supplied resource is not a valid imap resource in %s on line %d
39 bool(false)
41 -- Directory Resource opened with opendir() --
42 resource(%d) of type (stream)
44 Warning: imap_fetch_overview(): supplied resource is not a valid imap resource in %s on line %d
45 bool(false)
46 ===DONE===