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

testWebsocketServerOnSubscribe()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 15
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
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