summaryrefslogtreecommitdiff
path: root/src/tests/disabled_functions_method.phpt
blob: 72e633e476aa34f003ef14c23b821c95e0b93c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Disable functions
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_disabled_functions_method.ini
--FILE--
<?php 
class AwesomeClass {
	function method1($a) {
		echo "method1:" . $a . "\n";
	}
	function method2($a) {
		echo "method2:" . $a . "\n";
	}
	function method3($a) {
		echo "method3:" . $a . "\n";
	}
}

$c = new AwesomeClass();
$c->method1("pif");
$c->method2("paf");
$c->method3("pouet");
?>
--EXPECTF--
Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'AwesomeClass::method1' in %a/disabled_functions_method.php on line 4