diff options
Diffstat (limited to 'src/tests/disabled_function_local_var_9.phpt')
| -rw-r--r-- | src/tests/disabled_function_local_var_9.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tests/disabled_function_local_var_9.phpt b/src/tests/disabled_function_local_var_9.phpt new file mode 100644 index 0000000..fb65bc4 --- /dev/null +++ b/src/tests/disabled_function_local_var_9.phpt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - match on a local variable | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | namespace qwe { | ||
| 10 | const QWE = Array('123'=>'asdfgh'); | ||
| 11 | } | ||
| 12 | namespace asd { | ||
| 13 | const asd = 'qwe'; | ||
| 14 | echo "Valeur: " . \qwe\QWE[123]. "\n"; | ||
| 15 | strlen("qwe"); | ||
| 16 | } | ||
| 17 | ?> | ||
| 18 | --EXPECTF-- | ||
| 19 | Valeur: asdfgh | ||
| 20 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'strlen' in %a/tests/disabled_function_local_var_9.php:%d has been disabled. | ||
