summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/test_php_application.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test_php_application.py b/test/test_php_application.py
index 837181e6..37606fa2 100644
--- a/test/test_php_application.py
+++ b/test/test_php_application.py
@@ -1,4 +1,6 @@
+import os
import re
+import shutil
import unittest
from unit.applications.lang.php import TestApplicationPHP
@@ -512,5 +514,33 @@ class TestPHPApplication(TestApplicationPHP):
self.get(url='/index.wrong')['status'], 200, 'status'
)
+ new_root = self.testdir + "/php"
+ os.mkdir(new_root)
+ shutil.copy(self.current_dir + '/php/phpinfo/index.wrong', new_root)
+
+ self.assertIn(
+ 'success',
+ self.conf(
+ {
+ "listeners": {"*:7080": {"pass": "applications/phpinfo"}},
+ "applications": {
+ "phpinfo": {
+ "type": "php",
+ "processes": {"spare": 0},
+ "root": new_root,
+ "working_directory": new_root,
+ }
+ },
+ }
+ ),
+ 'configure new root',
+ )
+
+ resp = self.get()
+ self.assertNotEqual(
+ str(resp['status']) + resp['body'], '200', 'status new root'
+ )
+
+
if __name__ == '__main__':
TestPHPApplication.main()