Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from elvetemedve/fix/amend-process-factory-to-b…
Browse files Browse the repository at this point in the history
…e-able-to-stop-processes

Fix process create to use exec to be able to stop the processes
  • Loading branch information
Geza Buza committed Nov 16, 2015
2 parents 27367ea + d1e4a54 commit f4437bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Services/ProcessFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand All @@ -65,7 +65,7 @@ public function createWebServerProcess($documentRoot, $hostname, $port)
public function createBrowserProcess($browserCommand, $workingDirectory)
{
return new Process(
escapeshellcmd($browserCommand),
'exec ' . escapeshellcmd($browserCommand),
$workingDirectory
);
}
Expand Down
3 changes: 1 addition & 2 deletions src/TestRunnerContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ public function beforeRunTests()
*/
public function afterRunTests(AfterScenarioScope $scope)
{
$this->printTesterOutputOnFailure($scope);
$this->clearWorkingDirectory();
$this->destroyProcesses();
$this->printTesterOutputOnFailure($scope);
}

/**
Expand Down Expand Up @@ -150,7 +150,6 @@ public function destroyProcesses()
}

$this->processes = [];
$this->behatProcess = null;
}

/**
Expand Down

0 comments on commit f4437bd

Please sign in to comment.