Files
nginx-unit/test/unit/applications/lang/php.py
2019-04-26 17:35:26 +03:00

22 lines
689 B
Python

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