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

28 lines
637 B
PHP

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