Exemple #1
0
 public function testCreateFromGlobals()
 {
     $server = Server::createFromGlobals();
     $this->assertRegExp('/"name":"' . php_uname('n') . '"/', json_encode($server));
 }
Exemple #2
0
 /**
  * Registers a shutdown handler.
  *
  * @param Client       $client
  * @param ErrorHandler $handler
  * @param array        $application
  *
  * @return ShutdownHandler
  */
 private static function registerShutdownHandler(Client $client, ErrorHandler $handler, array $application)
 {
     return ShutdownHandler::register($client, $handler, new ReportFactory(self::createApplication($application), Request::createFromGlobals(), Server::createFromGlobals()));
 }