/**
  * @param Daemon $daemon
  * @param OutputLogger $logger
  */
 protected function doStart(Daemon $daemon, OutputLogger $logger)
 {
     try {
         if ($daemon->run()) {
             $logger->info('Daemon was started');
         }
     } catch (\Exception $e) {
         $logger->info('Daemon can`t be started');
     }
 }
 public function testRun()
 {
     $this->process->expects($this->exactly(2))->method('getOutput')->will($this->onConsecutiveCalls('', $this->getPsOutput()));
     $this->assertEquals(111, $this->object->run());
 }