diff options
| author | Sebastien Blot | 2017-09-20 10:11:01 +0200 |
|---|---|---|
| committer | Sebastien Blot | 2017-09-20 10:11:01 +0200 |
| commit | 868f96c759b6650d88ff9f4fbc5c048302134248 (patch) | |
| tree | c0de0af318bf77a8959164ef11aeeeb2b7bab294 /src/tests/disabled_functions_method.phpt | |
Initial import
Diffstat (limited to 'src/tests/disabled_functions_method.phpt')
| -rw-r--r-- | src/tests/disabled_functions_method.phpt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tests/disabled_functions_method.phpt b/src/tests/disabled_functions_method.phpt new file mode 100644 index 0000000..33651b7 --- /dev/null +++ b/src/tests/disabled_functions_method.phpt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_method.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | class AwesomeClass { | ||
| 10 | function method1($a) { | ||
| 11 | echo "method1:" . $a . "\n"; | ||
| 12 | } | ||
| 13 | function method2($a) { | ||
| 14 | echo "method2:" . $a . "\n"; | ||
| 15 | } | ||
| 16 | function method3($a) { | ||
| 17 | echo "method3:" . $a . "\n"; | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | $c = new AwesomeClass(); | ||
| 22 | $c->method1("pif"); | ||
| 23 | $c->method2("paf"); | ||
| 24 | $c->method3("pouet"); | ||
| 25 | ?> | ||
| 26 | --EXPECTF-- | ||
| 27 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'AwesomeClass::method1' in %a/tests/disabled_functions_method.php:4 has been disabled. | ||
| 28 | method2:paf | ||
| 29 | [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'AwesomeClass::method3' in %a/tests/disabled_functions_method.php:10 has been disabled, because its argument 'a' content (pouet) matched a rule. | ||
