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