Repaired tests + refactored code for tests

This commit is contained in:
Dmitry Khomutov 2016-08-11 21:32:42 +07:00
commit 9de4fb51d3
37 changed files with 409 additions and 1125 deletions

View file

@ -30,14 +30,16 @@ class UnixProcessControl implements ProcessControlInterface
}
/**
* Sends a signal using the "kill" command.
*
* @param int $pid
* @param bool $forcefully
* {@inheritdoc}
*/
public function kill($pid, $forcefully = false)
{
exec(sprintf("kill -%d %d", $forcefully ? 9 : 15, $pid));
$output = [];
$result = 1;
exec(sprintf("kill -%d %d", $forcefully ? 9 : 15, $pid), $output, $result);
return !$result;
}
/**