php-censor/Tests/PHPCI/ProcessControl/PosixProcessControlTest.php
Adirelle 7de9023810 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
2015-05-28 10:55:59 +02:00

18 lines
398 B
PHP

<?php
namespace Tests\PHPCI\ProcessControl;
use PHPCI\ProcessControl\PosixProcessControl;
class PosixProcessControlTest extends UnixProcessControlTest
{
protected function setUp()
{
$this->object = new PosixProcessControl();
}
public function testIsAvailable()
{
$this->assertEquals(function_exists('posix_kill'), PosixProcessControl::isAvailable());
}
}