WebSocketServerTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 7
Bugs 0 Features 0
Metric Value
eloc 8
c 7
b 0
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A is_server_running() 0 11 1
1
<?php
2
3
namespace WSSCTEST;
4
5
use PHPUnit\Framework\TestCase;
6
use WSSC\Components\ServerConfig;
7
use WSSC\WebSocketServer;
8
9
class WebSocketServerTest extends TestCase
10
{
11
    /**
12
     * @test
13
     * @throws \WSSC\Exceptions\WebSocketException
14
     * @throws \WSSC\Exceptions\ConnectionException
15
     */
16
    public static function is_server_running()
17
    {
18
        echo 'Running server...' . PHP_EOL;
19
20
        $config = new ServerConfig();
21
        $config->setClientsPerFork(2500);
22
        $config->setStreamSelectTimeout(2 * 3600);
23
        $config->setLoopingDelay(1);
24
25
        $websocketServer = new WebSocketServer(new ServerHandler(), $config);
26
        $websocketServer->run();
27
    }
28
}
29