summaryrefslogtreecommitdiff
path: root/ext/imap/tests/imap_gc_error.phpt
blob: 7c6fa3da847f495b8ef762a8633ba7cbb8f03385 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
imap_gc() ValueError
--CREDITS--
Paul Sohier
#phptestfest utrecht
--SKIPIF--
<?php
require_once(__DIR__.'/setup/skipif.inc');
?>
--FILE--
<?php

require_once(__DIR__.'/setup/imap_include.inc');
$stream_id = setup_test_mailbox('imapgcerror', 1);

try {
    imap_gc($stream_id, -1);
} catch (\ValueError $e) {
    echo $e->getMessage() . \PHP_EOL;
}

?>
--CLEAN--
<?php
$mailbox_suffix = 'imapgcerror';
require_once(__DIR__.'/setup/clean.inc');
?>
--EXPECT--
Create a temporary mailbox and add 1 msgs
New mailbox created
imap_gc(): Argument #2 ($flags) must be a bitmask of IMAP_GC_TEXTS, IMAP_GC_ELT, and IMAP_GC_ENV