xref: /PHP-8.0/ext/imap/tests/bug64076.phpt (revision 5aaffc80)
1--TEST--
2Bug #64076 (imap_sort() does not return FALSE on failure)
3--SKIPIF--
4<?php
5require_once __DIR__ . '/setup/skipif.inc';
6?>
7--FILE--
8<?php
9require_once __DIR__ . '/setup/imap_include.inc';
10$stream = setup_test_mailbox('bug64076', 2);
11imap_errors(); // clear error stack
12var_dump(imap_sort($stream, SORTFROM, 0, 0, 'UNSUPPORTED SEARCH CRITERIUM'));
13var_dump(imap_errors() !== false);
14?>
15--CLEAN--
16<?php
17$mailbox_suffix = 'bug64076';
18require_once(__DIR__ . '/setup/clean.inc');
19?>
20--EXPECT--
21Create a temporary mailbox and add 2 msgs
22New mailbox created
23bool(false)
24bool(true)
25