Exemplo n.º 1
0
 /**
  * @throws \Exception
  */
 public function start()
 {
     try {
         $this->running = true;
         $this->run($this->config->getCallback());
     } catch (LoopException $exception) {
         $this->event->setException($exception);
         $this->stop();
     } catch (\Exception $exception) {
         throw $exception;
     }
 }
Exemplo n.º 2
0
 public function testCallbackAccessor()
 {
     $this->assertNull($this->instance->getCallback());
     $this->assertSame($this->instance, $this->instance->setCallback('trim'));
     $this->assertSame('trim', $this->instance->getCallback());
 }