php-src/ext/imap/tests/imap_num_recent_error.phpt
Gabriel Caruso fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00

27 lines
662 B
PHP

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