|
13 | 13 |
|
14 | 14 | use FOS\HttpCache\ProxyClient\Varnish; |
15 | 15 | use Symfony\Component\Process\Process; |
| 16 | +use Symfony\Component\Process\ProcessBuilder; |
16 | 17 |
|
17 | 18 | /** |
18 | 19 | * A phpunit base class to write functional tests with varnish. |
@@ -156,15 +157,17 @@ protected function stopVarnish() |
156 | 157 | */ |
157 | 158 | protected function startVarnish() |
158 | 159 | { |
159 | | - $cmd = $this->getBinary() . |
160 | | - ' -a 127.0.0.1:' . $this->getCachingProxyPort() . |
161 | | - ' -T 127.0.0.1:' . $this->getVarnishMgmtPort() . |
162 | | - ' -f ' . $this->getConfigFile() . |
163 | | - ' -n ' . $this->getCacheDir() . |
164 | | - ' -p vcl_dir=' . $this->getConfigDir() . |
165 | | - ' -P ' . self::PID; |
166 | | - |
167 | | - $process = new Process($cmd); |
| 160 | + $builder = new ProcessBuilder(array( |
| 161 | + $this->getBinary(), |
| 162 | + '-a', '127.0.0.1:' . $this->getCachingProxyPort(), |
| 163 | + '-T', '127.0.0.1:' . $this->getVarnishMgmtPort(), |
| 164 | + '-f', $this->getConfigFile(), |
| 165 | + '-n', $this->getCacheDir(), |
| 166 | + '-p', 'vcl_dir=' . $this->getConfigDir(), |
| 167 | + '-P', self::PID |
| 168 | + )); |
| 169 | + |
| 170 | + $process = $builder->getProcess(); |
168 | 171 | $process->run(); |
169 | 172 |
|
170 | 173 | if (!$process->isSuccessful()) { |
|
0 commit comments