diff options
Diffstat (limited to '')
-rw-r--r-- | test/test_php_application.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test_php_application.py b/test/test_php_application.py index bb7d978c..d9c16a6d 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -713,3 +713,20 @@ class TestPHPApplication(TestApplicationPHP): ), 'relative path w/ chdir' assert self.get()['body'] == 'test', 'relative path 2' + + def test_php_application_shared_opcache(self): + self.load('opcache', limits={'requests': 1}) + + r = self.get() + cached = r['headers']['X-Cached'] + if cached == '-1': + pytest.skip('opcache is not supported') + + pid = r['headers']['X-Pid'] + + assert cached == '0', 'not cached' + + r = self.get() + + assert r['headers']['X-Pid'] != pid, 'new instance' + assert r['headers']['X-Cached'] == '1', 'cached' |