diff --git a/src/Services/ProcessFactory.php b/src/Services/ProcessFactory.php index 96cdb16..e54771f 100644 --- a/src/Services/ProcessFactory.php +++ b/src/Services/ProcessFactory.php @@ -51,7 +51,7 @@ public function createWebServerProcess($documentRoot, $hostname, $port) $documentRoot = escapeshellarg($documentRoot); return new Process( - sprintf('%s -S %s:%s -t %s', $this->phpBin, $hostname, $port, $documentRoot), + sprintf('exec %s -S %s:%s -t %s', $this->phpBin, $hostname, $port, $documentRoot), $documentRoot ); } @@ -65,7 +65,7 @@ public function createWebServerProcess($documentRoot, $hostname, $port) public function createBrowserProcess($browserCommand, $workingDirectory) { return new Process( - escapeshellcmd($browserCommand), + 'exec ' . escapeshellcmd($browserCommand), $workingDirectory ); } diff --git a/src/TestRunnerContext.php b/src/TestRunnerContext.php index fdbe4a6..203cb56 100644 --- a/src/TestRunnerContext.php +++ b/src/TestRunnerContext.php @@ -111,9 +111,9 @@ public function beforeRunTests() */ public function afterRunTests(AfterScenarioScope $scope) { - $this->printTesterOutputOnFailure($scope); $this->clearWorkingDirectory(); $this->destroyProcesses(); + $this->printTesterOutputOnFailure($scope); } /** @@ -150,7 +150,6 @@ public function destroyProcesses() } $this->processes = []; - $this->behatProcess = null; } /**