Пример #1
0
 public function testSignal()
 {
     $signalNo = 9;
     $destination = 1;
     $signal = new Signal($signalNo, $destination);
     $this->assertSame($signalNo, $signal->getSignalNo());
     $this->assertSame($destination, $signal->getDestination());
 }
Пример #2
0
 /**
  * @param Signal $signal
  *
  * @return $this
  */
 public function send(Signal $signal) : self
 {
     $destination = $signal->getDestination();
     $this->getPosix()->kill($destination, $signal->getSignalNo());
     return $this;
 }