Completed
Push — master ( 5b84c6...1f2285 )
by Julien
16:45
created

WebsocketServerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 18
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testWebsocketServerOnSubscribe() 0 15 1
1
<?php
2
3
namespace Eole\Sandstone\Tests\Integration;
4
5
use Psr\Log\NullLogger;
6
use Ratchet\Wamp\WampConnection;
7
8
class WebsocketServerTest extends \PHPUnit_Framework_TestCase
9
{
10
    public function testWebsocketServerOnSubscribe()
11
    {
12
        $app = new App\App();
13
14
        $app->topic('articles', function ($topicPattern) {
15
            return new App\ArticleTopic($topicPattern);
16
        });
17
18
        $wsApp = new \Eole\Sandstone\Websocket\Application($app);
19
        $wsApp->setLogger(new NullLogger());
20
21
        $connectionMock = $this->getMock(WampConnection::class, [], [], '', false);
22
23
        $wsApp->onSubscribe($connectionMock, 'articles');
24
    }
25
}
26