xref: /PHP-5.6/ext/opcache/tests/blacklist.phpt (revision 8092de3c)
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
8--SKIPIF--
9<?php require_once('skipif.inc'); ?>
10<?php if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for Windows'); } ?>
11--FILE--
12<?php
13$conf = opcache_get_configuration();
14$conf = $conf['blacklist'];
15$conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]);
16$conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]);
17print_r($conf);
18include("blacklist.inc");
19$status = opcache_get_status();
20print_r(count($status['scripts']));
21?>
22--EXPECT--
23Array
24(
25    [0] => /path/to/foo
26    [1] => /path/to/foo2
27    [2] => /path/to/bar
28    [3] => __DIR__/blacklist.inc
29    [4] => __DIR__/current.php
30    [5] => /tmp/path/?nocache.inc
31    [6] => /tmp/path/*/somedir
32)
33ok
341
35