Tests: chdir() and open() for PHP module.

These tests ensure optimizations in the chdir calls don't break
SAPI semantics.
This commit is contained in:
Tiago Natel de Moura
2020-03-03 18:53:26 +00:00
parent 293b0da520
commit 80763b3e64
6 changed files with 161 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ from unit.applications.proto import TestApplicationProto
class TestApplicationPHP(TestApplicationProto):
application_type = "php"
def load(self, script, name='index.php', **kwargs):
def load(self, script, index='index.php', **kwargs):
script_path = self.current_dir + '/php/' + script
self._load_conf(
@@ -16,7 +16,7 @@ class TestApplicationPHP(TestApplicationProto):
"processes": {"spare": 0},
"root": script_path,
"working_directory": script_path,
"index": name,
"index": index,
}
},
},