1 | <?php |
||
19 | class DockerChrome extends Extension |
||
20 | { |
||
21 | /** |
||
22 | * events |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | static public $events = [ |
||
27 | 'module.init' => 'moduleInit', |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * process |
||
32 | * |
||
33 | * @var \Symfony\Component\Process\Process |
||
34 | */ |
||
35 | private $process; |
||
36 | |||
37 | /** |
||
38 | * dockerStarted |
||
39 | * |
||
40 | * @var bool |
||
41 | */ |
||
42 | private $dockerStarted = false; |
||
43 | |||
44 | /** |
||
45 | * dockerComposePath |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | private $dockerComposePath; |
||
50 | |||
51 | /** |
||
52 | * DockerChrome constructor. |
||
53 | * |
||
54 | * @param array $config |
||
55 | * @param array $options |
||
56 | * @param \Symfony\Component\Process\Process|null $process |
||
57 | * @param string $defaultDockerComposePath |
||
58 | */ |
||
59 | 14 | public function __construct( |
|
79 | |||
80 | /** |
||
81 | * initDefaultConfig |
||
82 | * |
||
83 | * @return void |
||
84 | * @throws \Codeception\Exception\ExtensionException |
||
85 | */ |
||
86 | 14 | protected function initDefaultConfig() |
|
106 | |||
107 | /** |
||
108 | * getCommand |
||
109 | * |
||
110 | * @return string |
||
111 | */ |
||
112 | 14 | private function getCommand(): string |
|
116 | |||
117 | /** |
||
118 | * getConfig |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | 7 | public function getConfig(): array |
|
126 | |||
127 | /** |
||
128 | * |
||
129 | */ |
||
130 | 9 | public function __destruct() |
|
134 | |||
135 | /** |
||
136 | * stopServer |
||
137 | * |
||
138 | * @return void |
||
139 | */ |
||
140 | 9 | private function stopServer() |
|
149 | |||
150 | /** |
||
151 | * moduleInit |
||
152 | * |
||
153 | * @param \Codeception\Event\SuiteEvent $e |
||
154 | * @return void |
||
155 | */ |
||
156 | 4 | public function moduleInit(\Codeception\Event\SuiteEvent $e) |
|
166 | |||
167 | /** |
||
168 | * suiteAllowed |
||
169 | * |
||
170 | * @param \Codeception\Event\SuiteEvent $e |
||
171 | * @return bool |
||
172 | */ |
||
173 | 4 | protected function suiteAllowed(\Codeception\Event\SuiteEvent $e): bool |
|
190 | |||
191 | /** |
||
192 | * overrideWithModuleConfig |
||
193 | * |
||
194 | * @param \Codeception\Event\SuiteEvent $e |
||
195 | * @return void |
||
196 | */ |
||
197 | 3 | protected function overrideWithModuleConfig(\Codeception\Event\SuiteEvent $e) |
|
209 | |||
210 | /** |
||
211 | * generateYaml |
||
212 | * |
||
213 | * @return void |
||
214 | */ |
||
215 | 3 | protected function generateYaml() |
|
242 | |||
243 | /** |
||
244 | * startServer |
||
245 | * |
||
246 | * @return void |
||
247 | * @throws \Codeception\Exception\ExtensionException |
||
248 | */ |
||
249 | 3 | private function startServer() |
|
270 | } |
||
271 |