Ejemplo n.º 1
0
 /**
  * Run Application
  *
  * @return $this
  */
 public function run()
 {
     $application = $this;
     $this->server->getHttpServer()->on('request', function ($request, $response) use($application) {
         $application->handleRequest($request, $response);
     });
     $this->server->setHost($this->serverHost)->setPort($this->serverPort)->start();
     return $this;
 }
Ejemplo n.º 2
0
 public function testStart()
 {
     $mockProcess = Mockery::mock('Pagon\\ChildProcess\\Process');
     $this->mockPrimer->shouldReceive('prepare')->andReturn($this->mockPrimer);
     $this->mockProcessManager->shouldReceive('parallel')->andReturn($mockProcess);
     $server = new Server($this->mockProcessManager, $this->mockPrimer);
     $server->start();
 }