mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Zend: Add test disabling assert() function
This commit is contained in:
15
Zend/tests/assert/disable_assert_function.phpt
Normal file
15
Zend/tests/assert/disable_assert_function.phpt
Normal file
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Use disable_functions INI setting to disable assert()
|
||||
--INI--
|
||||
zend.assertions=1
|
||||
disable_functions=assert
|
||||
--FILE--
|
||||
<?php
|
||||
try {
|
||||
assert(false && "Is this evaluated?");
|
||||
} catch (Throwable $e) {
|
||||
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Error: Call to undefined function assert()
|
||||
Reference in New Issue
Block a user