1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Files
archived-php-src/ext/imap/tests/imap_num_msg_error.phpt
Máté Kocsis 960318ed95 Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00

28 lines
658 B
PHP

--TEST--
imap_num_msg() incorrect parameter count
--CREDITS--
Paul Sohier
#phptestfest utrecht
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
?>
--FILE--
<?php
echo "Checking with no parameters\n";
imap_num_msg();
echo "Checking with incorrect parameter type\n";
imap_num_msg('');
imap_num_msg(false);
?>
--EXPECTF--
Checking with no parameters
Warning: imap_num_msg() expects exactly 1 parameter, 0 given in %s on line %d
Checking with incorrect parameter type
Warning: imap_num_msg(): Argument #1 must be of type resource, string given in %s on line %d
Warning: imap_num_msg(): Argument #1 must be of type resource, bool given in %s on line %d