1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/readline/tests/readline_completion_function_001.phpt
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

31 lines
609 B
PHP

--TEST--
readline_completion_function(): Basic test
--EXTENSIONS--
readline
--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