Ejemplo n.º 1
0
 public function testSocket()
 {
     $path = $this->getCachePath('localhost:8443');
     if (file_exists($path)) {
         unlink($path);
     }
     $server = new SslHttpServer(new SslHttpHandler());
     $socket = $server->createSocket('localhost:8443');
     $this->assertInternalType('resource', $socket);
     fclose($socket);
     $server = new SslHttpServer(new SslHttpHandler());
     $socket = $server->createSocket('localhost:8443');
     $this->assertInternalType('resource', $socket);
     fclose($socket);
     if (file_exists($path)) {
         unlink($path);
     }
 }