@@ -44,6 +44,7 @@ |
||
| 44 | 44 | * @param string $path |
| 45 | 45 | * @param string $logsPath |
| 46 | 46 | * @param bool $debug |
| 47 | + * @param string $expectationsPath |
|
| 47 | 48 | */ |
| 48 | 49 | public function start($ip, $port, $path, $logsPath, $debug, $expectationsPath) |
| 49 | 50 | { |
@@ -47,23 +47,23 @@ |
||
| 47 | 47 | */ |
| 48 | 48 | public function start($ip, $port, $path, $logsPath, $debug, $expectationsPath) |
| 49 | 49 | { |
| 50 | - $phiremockPath = is_file($path) ? $path : $path . DIRECTORY_SEPARATOR . 'phiremock'; |
|
| 51 | - $expectationsPath= is_dir($expectationsPath) ? $expectationsPath: ''; |
|
| 50 | + $phiremockPath = is_file($path) ? $path : $path.DIRECTORY_SEPARATOR.'phiremock'; |
|
| 51 | + $expectationsPath = is_dir($expectationsPath) ? $expectationsPath : ''; |
|
| 52 | 52 | |
| 53 | 53 | if ($debug) { |
| 54 | - echo 'Running ' . $this->getCommandPrefix() |
|
| 54 | + echo 'Running '.$this->getCommandPrefix() |
|
| 55 | 55 | . "{$phiremockPath} -i {$ip} -p {$port}" |
| 56 | - . ($debug? ' -d' : '') |
|
| 57 | - . ($expectationsPath? " -e {$expectationsPath}" : '' ) . PHP_EOL; |
|
| 56 | + . ($debug ? ' -d' : '') |
|
| 57 | + . ($expectationsPath ? " -e {$expectationsPath}" : '').PHP_EOL; |
|
| 58 | 58 | } |
| 59 | 59 | $this->process = new Process( |
| 60 | 60 | $this->getCommandPrefix() |
| 61 | 61 | . "{$phiremockPath} -i {$ip} -p {$port}" |
| 62 | 62 | . ($debug ? ' -d' : '') |
| 63 | - . ($expectationsPath? " -e {$expectationsPath}" : '' ) |
|
| 63 | + . ($expectationsPath ? " -e {$expectationsPath}" : '') |
|
| 64 | 64 | ); |
| 65 | - $logFile = $logsPath . DIRECTORY_SEPARATOR . self::LOG_FILE_NAME; |
|
| 66 | - $this->process->start(function ($type, $buffer) use ($logFile) { |
|
| 65 | + $logFile = $logsPath.DIRECTORY_SEPARATOR.self::LOG_FILE_NAME; |
|
| 66 | + $this->process->start(function($type, $buffer) use ($logFile) { |
|
| 67 | 67 | file_put_contents($logFile, $buffer, FILE_APPEND); |
| 68 | 68 | }); |
| 69 | 69 | $this->process->setEnhanceSigchildCompatibility(true); |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | array $options, |
| 60 | 60 | PhiremockProcess $process = null |
| 61 | 61 | ) { |
| 62 | - $this->config['bin_path'] = Config::projectDir() . '../vendor/bin/phiremock'; |
|
| 62 | + $this->config['bin_path'] = Config::projectDir().'../vendor/bin/phiremock'; |
|
| 63 | 63 | $this->config['logs_path'] = Config::logDir(); |
| 64 | 64 | $this->config['expectations_path'] = null; |
| 65 | 65 | |