mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
Zend: Add test disabling assert() function
This commit is contained in:
parent
b9da6cb3a2
commit
bc8909aac3
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()
|
Loading…
Reference in New Issue
Block a user