Files
nginx-unit/test/unit/applications/lang/php.py
Tiago Natel de Moura 80763b3e64 Tests: chdir() and open() for PHP module.
These tests ensure optimizations in the chdir calls don't break
SAPI semantics.
2020-03-03 18:53:26 +00:00

25 lines
769 B
Python

from unit.applications.proto import TestApplicationProto
class TestApplicationPHP(TestApplicationProto):
application_type = "php"
def load(self, script, index='index.php', **kwargs):
script_path = self.current_dir + '/php/' + script
self._load_conf(
{
"listeners": {"*:7080": {"pass": "applications/" + script}},
"applications": {
script: {
"type": self.application_type,
"processes": {"spare": 0},
"root": script_path,
"working_directory": script_path,
"index": index,
}
},
},
**kwargs
)