summaryrefslogtreecommitdiffhomepage
path: root/test/php
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2021-12-11 00:16:59 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2021-12-11 00:16:59 +0000
commit4b3efcea0dfcc842fb1a0f62b610652323844d35 (patch)
treea890dc7c7c6cbc79e86557d19bfb92d2d4719229 /test/php
parentad843df965f47b5d209603de49d0b3b16938149d (diff)
downloadunit-4b3efcea0dfcc842fb1a0f62b610652323844d35.tar.gz
unit-4b3efcea0dfcc842fb1a0f62b610652323844d35.tar.bz2
Tests: added more OPcache tests.
Diffstat (limited to 'test/php')
-rw-r--r--test/php/opcache/index.php2
-rw-r--r--test/php/opcache/preload/chdir.php7
-rw-r--r--test/php/opcache/preload/fastcgi_finish_request.php5
3 files changed, 13 insertions, 1 deletions
diff --git a/test/php/opcache/index.php b/test/php/opcache/index.php
index de4002bb..cf67c4c2 100644
--- a/test/php/opcache/index.php
+++ b/test/php/opcache/index.php
@@ -12,7 +12,7 @@ if (function_exists('opcache_is_script_cached')) {
opcache_compile_file(__DIR__ . '/test.php');
}
} else {
- header('X-Cached: -1');
+ header('X-OPcache: -1');
}
?>
diff --git a/test/php/opcache/preload/chdir.php b/test/php/opcache/preload/chdir.php
new file mode 100644
index 00000000..ad75e6ad
--- /dev/null
+++ b/test/php/opcache/preload/chdir.php
@@ -0,0 +1,7 @@
+<?php
+
+chdir(realpath(__DIR__ . '/..'));
+
+opcache_compile_file('index.php');
+
+?>
diff --git a/test/php/opcache/preload/fastcgi_finish_request.php b/test/php/opcache/preload/fastcgi_finish_request.php
new file mode 100644
index 00000000..31630cfa
--- /dev/null
+++ b/test/php/opcache/preload/fastcgi_finish_request.php
@@ -0,0 +1,5 @@
+<?php
+
+fastcgi_finish_request();
+
+?>