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