com php-src: Fix readline test after callback changes: ext/readline/tests/libedit_callback_handler_install_0 01.phpt

From: Date: Tue, 21 Jul 2020 08:40:08 +0000
Subject: com php-src: Fix readline test after callback changes: ext/readline/tests/libedit_callback_handler_install_0 01.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-112270@lists.php.net to get a copy of this message
Commit: da4262df6fde011b0de8eca47ab33ed685379a98 Author: Nikita Popov <nikita.ppv@gmail.com> Tue, 21 Jul 2020 10:32:08 +0200 Parents: be9c5daf286b856e943bccbe3fa45161afe5a222 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da4262df6fde011b0de8eca47ab33ed685379a98 Log: Fix readline test after callback changes This one requires libedit and was probably missed for that reason. Changed paths: M ext/readline/tests/libedit_callback_handler_install_001.phpt Diff: diff --git a/ext/readline/tests/libedit_callback_handler_install_001.phpt b/ext/readline/tests/libedit_callback_handler_install_001.phpt index 70351fd74b..527289a51e 100644 --- a/ext/readline/tests/libedit_callback_handler_install_001.phpt +++ b/ext/readline/tests/libedit_callback_handler_install_001.phpt @@ -14,11 +14,13 @@ function foo() { } var_dump(readline_callback_handler_install('testing: ', 'foo')); -var_dump(readline_callback_handler_install('testing: ', 'foobar!')); +try { + var_dump(readline_callback_handler_install('testing: ', 'foobar!')); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> ---EXPECTF-- +--EXPECT-- bool(true) - -Warning: readline_callback_handler_install(): foobar! is not callable in %s on line %d -bool(false) +readline_callback_handler_install(): Argument #2 ($callback) must be a valid callback, function "foobar!" not found or invalid function name

« previous php.cvs (#112270) next »