Reworked the DaemonCommand.

* Accepts options for PID and log file.
* Uses posix_kill whenever available.
* Checks that the daemon actually started or stopped.
* Try to terminate then kill the daemon.
* Uses the logger or output instead of "echo".

Added a ProcessControl interface and implementations.

Closed #908
This commit is contained in:
Adirelle 2015-04-09 08:51:45 +02:00 committed by Tobias van Beek
commit 4edefee761
11 changed files with 572 additions and 45 deletions

View file

@ -0,0 +1,22 @@
<?php
namespace Tests\PHPCI\ProcessControl;
use PHPCI\ProcessControl\WindowsProcessControl;
class WindowsProcessControlTest extends ProcessControlTest
{
protected function setUp()
{
$this->object = new WindowsProcessControl;
}
public function getTestCommand()
{
return "pause";
}
public function testIsAvailable()
{
$this->assertEquals(DIRECTORY_SEPARATOR === '\\', WindowsProcessControl::isAvailable());
}
}