php.py (1116:5e429a7f133c) php.py (1303:248eeec4c272)
1from unit.applications.proto import TestApplicationProto
2
3
4class TestApplicationPHP(TestApplicationProto):
5 application_type = "php"
6
1from unit.applications.proto import TestApplicationProto
2
3
4class TestApplicationPHP(TestApplicationProto):
5 application_type = "php"
6
7 def load(self, script, name='index.php'):
7 def load(self, script, name='index.php', **kwargs):
8 script_path = self.current_dir + '/php/' + script
9
10 self._load_conf(
11 {
12 "listeners": {"*:7080": {"pass": "applications/" + script}},
13 "applications": {
14 script: {
15 "type": self.application_type,
16 "processes": {"spare": 0},
17 "root": script_path,
18 "working_directory": script_path,
19 "index": name,
20 }
21 },
8 script_path = self.current_dir + '/php/' + script
9
10 self._load_conf(
11 {
12 "listeners": {"*:7080": {"pass": "applications/" + script}},
13 "applications": {
14 script: {
15 "type": self.application_type,
16 "processes": {"spare": 0},
17 "root": script_path,
18 "working_directory": script_path,
19 "index": name,
20 }
21 },
22 }
22 },
23 **kwargs
23 )
24 )