for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Eole\Sandstone\Tests\Integration;
use Psr\Log\NullLogger;
use Ratchet\Wamp\WampConnection;
class WebsocketServerTest extends \PHPUnit_Framework_TestCase
{
public function testWebsocketServerOnSubscribe()
$app = new App\App();
$app->topic('articles', function ($topicPattern) {
return new App\ArticleTopic($topicPattern);
});
$wsApp = new \Eole\Sandstone\Websocket\Application($app);
$wsApp->setLogger(new NullLogger());
$connectionMock = $this->getMock(WampConnection::class, [], [], '', false);
$wsApp->onSubscribe($connectionMock, 'articles');
}