xref: /PHP-8.3/ext/imap/tests/imap_is_open.phpt (revision 52a891ae)
1--TEST--
2Test imap_is_open()
3--EXTENSIONS--
4imap
5--SKIPIF--
6<?php
7require_once(__DIR__.'/setup/skipif.inc');
8?>
9--FILE--
10<?php
11
12// include file for required variables in imap_open()
13require_once(__DIR__.'/setup/imap_include.inc');
14
15$mailbox_suffix = 'imapisopen';
16
17// set up temp mailbox with 0 messages
18$stream_id = setup_test_mailbox($mailbox_suffix, 0, $mailbox);
19
20var_dump(imap_is_open($stream_id));
21
22// Close connection
23var_dump(imap_close($stream_id));
24var_dump(imap_is_open($stream_id));
25
26?>
27--CLEAN--
28<?php
29$mailbox_suffix = 'imapisopen';
30require_once(__DIR__.'/setup/clean.inc');
31?>
32--EXPECT--
33Create a temporary mailbox and add 0 msgs
34New mailbox created
35bool(true)
36bool(true)
37bool(false)
38