xref: /PHP-7.1/ext/opcache/tests/blacklist.phpt (revision 7af945e2)
1--TEST--
2Blacklist (with glob, quote and comments)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.blacklist_filename={PWD}/opcache-*.blacklist
7opcache.file_update_protection=0
8opcache.file_cache_only=0
9--SKIPIF--
10<?php require_once('skipif.inc'); ?>
11<?php if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for Windows'); } ?>
12--FILE--
13<?php
14$conf = opcache_get_configuration();
15$conf = $conf['blacklist'];
16$conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]);
17$conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]);
18print_r($conf);
19include("blacklist.inc");
20$status = opcache_get_status();
21print_r(count($status['scripts']));
22?>
23--EXPECT--
24Array
25(
26    [0] => /path/to/foo
27    [1] => /path/to/foo2
28    [2] => /path/to/bar
29    [3] => __DIR__/blacklist.inc
30    [4] => __DIR__/current.php
31    [5] => /tmp/path/?nocache.inc
32    [6] => /tmp/path/*/somedir
33)
34ok
351
36