1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 21:11:02 +02:00
Files
archived-php-src/ext/readline/tests/readline_completion_function_001.phpt
Máté Kocsis 26af806828 Review parameter names in ext/readline
Closes GH-6240
2020-09-30 10:10:28 +02:00

31 lines
653 B
PHP

--TEST--
readline_completion_function(): Basic test
--SKIPIF--
<?php if (!extension_loaded("readline")) die("skip"); ?>
--FILE--
<?php
function foo() { }
$data = array(
'foo',
'strtolower',
1,
1.1231
);
foreach ($data as $callback) {
try {
var_dump(readline_completion_function($callback));
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
}
?>
--EXPECT--
bool(true)
bool(true)
readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given
readline_completion_function(): Argument #1 ($callback) must be a valid callback, no array or string given