summaryrefslogtreecommitdiff
path: root/src/tests/disabled_functions_include_once.phpt
blob: 23416fdb1039572692cb168229d7d6a4bdfaf38c (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
--TEST--
Disable functions - include_once
--SKIPIF--
<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
--INI--
sp.configuration_file={PWD}/config/config_disabled_functions_include.ini
--FILE--
<?php 
$dir = __DIR__;
file_put_contents($dir . '/test.bla', "BLA\n");
file_put_contents($dir . '/test.sim', "MEH\n");
include_once $dir . '/test.bla';
include_once $dir . '/test.sim';
echo "1337\n";
?>
--EXPECTF--
BLA
[snuffleupagus][0.0.0.0][disabled_function][simulation] The call to the function 'include_once' in %a/disabled_functions_include_once.php:%d has been disabled, because its argument 'inclusion path' content (%a/test.sim) matched a rule.
MEH
1337
--CLEAN--
<?php
$dir = __DIR__;
unlink($dir . '/test.bla');
unlink($dir . '/test.sim');
?>