diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-03-15 23:36:47 +0100 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-03-15 23:36:47 +0100 |
commit | 6426420f61de0df32a6085924d25b347c8788363 (patch) | |
tree | ef32814ffbea0ad3c3c38a942f9751302606c736 /ext/opcache/tests | |
parent | f26c8644bb340e9e7abb6d1cedb091e9d87dd1d4 (diff) | |
parent | 26dfce7f36d1c6f737ac241df1315a1b42b932c7 (diff) | |
download | php-git-6426420f61de0df32a6085924d25b347c8788363.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Replace dirname(__FILE__) by __DIR__ in tests
Diffstat (limited to 'ext/opcache/tests')
-rw-r--r-- | ext/opcache/tests/blacklist-win32.phpt | 4 | ||||
-rw-r--r-- | ext/opcache/tests/blacklist.phpt | 4 | ||||
-rw-r--r-- | ext/opcache/tests/issue0140.phpt | 2 | ||||
-rw-r--r-- | ext/opcache/tests/revalidate_path_01.phpt | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/ext/opcache/tests/blacklist-win32.phpt b/ext/opcache/tests/blacklist-win32.phpt index 70c87338b5..17d75119ae 100644 --- a/ext/opcache/tests/blacklist-win32.phpt +++ b/ext/opcache/tests/blacklist-win32.phpt @@ -13,8 +13,8 @@ opcache.file_cache_only=0 <?php $conf = opcache_get_configuration(); $conf = $conf['blacklist']; -$conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]); -$conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]); +$conf[3] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[3]); +$conf[4] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[4]); print_r($conf); include("blacklist.inc"); $status = opcache_get_status(); diff --git a/ext/opcache/tests/blacklist.phpt b/ext/opcache/tests/blacklist.phpt index 635c2ae419..21139b751d 100644 --- a/ext/opcache/tests/blacklist.phpt +++ b/ext/opcache/tests/blacklist.phpt @@ -21,8 +21,8 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { <?php $conf = opcache_get_configuration(); $conf = $conf['blacklist']; -$conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]); -$conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]); +$conf[3] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[3]); +$conf[4] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[4]); print_r($conf); include("blacklist.inc"); $status = opcache_get_status(); diff --git a/ext/opcache/tests/issue0140.phpt b/ext/opcache/tests/issue0140.phpt index c22898e589..78f711fce9 100644 --- a/ext/opcache/tests/issue0140.phpt +++ b/ext/opcache/tests/issue0140.phpt @@ -10,7 +10,7 @@ opcache.file_update_protection=0 <?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow tests excluded by request") ?> --FILE-- <?php -define("FILENAME", dirname(__FILE__) . "/issuer0140.inc.php"); +define("FILENAME", __DIR__ . "/issuer0140.inc.php"); file_put_contents(FILENAME, "1\n"); var_dump(is_readable(FILENAME)); diff --git a/ext/opcache/tests/revalidate_path_01.phpt b/ext/opcache/tests/revalidate_path_01.phpt index a1d72bbcc5..e64dd44cdc 100644 --- a/ext/opcache/tests/revalidate_path_01.phpt +++ b/ext/opcache/tests/revalidate_path_01.phpt @@ -10,7 +10,7 @@ opcache.revalidate_path=1 server --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $dir1 = "$dir/test1"; $dir2 = "$dir/test2"; $link = "$dir/test"; @@ -55,7 +55,7 @@ echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/main.php'); ?> --CLEAN-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $dir1 = "$dir/test1"; $dir2 = "$dir/test2"; $link = "$dir/test"; |