Пример #1
0
 /**
  * Server constructor.
  *
  * @param callable                $handler
  * @param ServerRequestInterface  $request
  * @param ResponseInterface       $response
  * @param OutputInterface         $output
  */
 public function __construct($handler = null, ServerRequestInterface $request, ResponseInterface $response = null, OutputInterface $output = null)
 {
     parent::__construct($handler, $request, $response, $output);
     $this->uriData = new UriData();
     $this->loadSystemUris();
     $this->compressor = $this->createHttpCompressor();
 }
Пример #2
0
 /**
  * Method to test create().
  *
  * @return void
  *
  * @covers \Windwalker\Http\Server::create
  */
 public function testCreate()
 {
     $case = $this;
     $server = HttpServer::create(function (ServerRequestInterface $request, ResponseInterface $response, $finalHandler) use($case) {
     }, new ServerRequest(), new Response());
     $this->assertTrue($server instanceof HttpServer);
 }