1from unit.applications.proto import TestApplicationProto 2from conftest import option 3 4 5class TestApplicationPHP(TestApplicationProto): 6 application_type = "php" 7 8 def load(self, script, index='index.php', **kwargs): 9 script_path = option.test_dir + '/php/' + script
| 1from unit.applications.proto import TestApplicationProto 2from conftest import option 3 4 5class TestApplicationPHP(TestApplicationProto): 6 application_type = "php" 7 8 def load(self, script, index='index.php', **kwargs): 9 script_path = option.test_dir + '/php/' + script
|
| 10 appication_type = self.get_appication_type()
|
10
| 11
|
| 12 if appication_type is None: 13 appication_type = self.application_type 14
|
11 self._load_conf( 12 { 13 "listeners": {"*:7080": {"pass": "applications/" + script}}, 14 "applications": { 15 script: {
| 15 self._load_conf( 16 { 17 "listeners": {"*:7080": {"pass": "applications/" + script}}, 18 "applications": { 19 script: {
|
16 "type": self.application_type,
| 20 "type": appication_type,
|
17 "processes": {"spare": 0}, 18 "root": script_path, 19 "working_directory": script_path, 20 "index": index, 21 } 22 }, 23 }, 24 **kwargs 25 )
| 21 "processes": {"spare": 0}, 22 "root": script_path, 23 "working_directory": script_path, 24 "index": index, 25 } 26 }, 27 }, 28 **kwargs 29 )
|