xref: /PHP-8.2/ext/imap/tests/imap_gc_error.phpt (revision b5a14e6c)
1--TEST--
2imap_gc() ValueError
3--CREDITS--
4Paul Sohier
5#phptestfest utrecht
6--EXTENSIONS--
7imap
8--SKIPIF--
9<?php
10require_once(__DIR__.'/setup/skipif.inc');
11?>
12--FILE--
13<?php
14
15require_once(__DIR__.'/setup/imap_include.inc');
16$stream_id = setup_test_mailbox('imapgcerror', 1);
17
18try {
19    imap_gc($stream_id, -1);
20} catch (\ValueError $e) {
21    echo $e->getMessage() . \PHP_EOL;
22}
23
24?>
25--CLEAN--
26<?php
27$mailbox_suffix = 'imapgcerror';
28require_once(__DIR__.'/setup/clean.inc');
29?>
30--EXPECT--
31Create a temporary mailbox and add 1 msgs
32New mailbox created
33imap_gc(): Argument #2 ($flags) must be a bitmask of IMAP_GC_TEXTS, IMAP_GC_ELT, and IMAP_GC_ENV
34