Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/helpers/Ratchet/AbstractMessageComponentTestCase.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php
namespace Ratchet;

abstract class AbstractMessageComponentTestCase extends \PHPUnit_Framework_TestCase {
use PHPUnit\Framework\TestCase;

abstract class AbstractMessageComponentTestCase extends TestCase {
protected $_app;
protected $_serv;
protected $_conn;
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/AbstractConnectionDecoratorTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php
namespace Ratchet;
use Ratchet\Mock\ConnectionDecorator;

use Ratchet\Mock\ConnectionDecorator;
use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\AbstractConnectionDecorator
* @covers Ratchet\ConnectionInterface
*/
class AbstractConnectionDecoratorTest extends \PHPUnit_Framework_TestCase {
class AbstractConnectionDecoratorTest extends TestCase {
protected $mock;
protected $l1;
protected $l2;
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/Http/HttpRequestParserTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
namespace Ratchet\Http;

use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Http\HttpRequestParser
*/
class HttpRequestParserTest extends \PHPUnit_Framework_TestCase {
class HttpRequestParserTest extends TestCase {
protected $parser;

public function setUp() {
Expand Down
13 changes: 7 additions & 6 deletions tests/unit/Http/RouterTest.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<?php
namespace Ratchet\Http;

use Ratchet\WebSocket\WsServerInterface;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
use Symfony\Component\Routing\RequestContext;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Matcher\UrlMatcher;

use PHPUnit\Framework\TestCase;

/**
* @covers Ratchet\Http\Router
*/
class RouterTest extends \PHPUnit_Framework_TestCase {
class RouterTest extends TestCase {
protected $_router;
protected $_matcher;
protected $_conn;
Expand Down Expand Up @@ -151,10 +152,10 @@ public function testImpatientClientOverflow() {
$this->_conn->expects($this->once())->method('close');

$header = "GET /nope HTTP/1.1
Upgrade: websocket
Connection: upgrade
Host: localhost
Origin: http://localhost
Upgrade: websocket
Connection: upgrade
Host: localhost
Origin: http://localhost
Sec-WebSocket-Version: 13\r\n\r\n";

$app = new HttpServer(new Router(new UrlMatcher(new RouteCollection, new RequestContext)));
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/Server/EchoServerTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?php
namespace Ratchet\Server;

use Ratchet\Server\EchoServer;
use PHPUnit\Framework\TestCase;

class EchoServerTest extends \PHPUnit_Framework_TestCase {
class EchoServerTest extends TestCase {
protected $_conn;
protected $_comp;

Expand Down
5 changes: 3 additions & 2 deletions tests/unit/Server/FlashPolicyComponentTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php
namespace Ratchet\Application\Server;
use Ratchet\Server\FlashPolicy;

use Ratchet\Server\FlashPolicy;
use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Server\FlashPolicy
*/
class FlashPolicyTest extends \PHPUnit_Framework_TestCase {
class FlashPolicyTest extends TestCase {

protected $_policy;

Expand Down
5 changes: 3 additions & 2 deletions tests/unit/Server/IoConnectionTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php
namespace Ratchet\Application\Server;
use Ratchet\Server\IoConnection;

use Ratchet\Server\IoConnection;
use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Server\IoConnection
*/
class IoConnectionTest extends \PHPUnit_Framework_TestCase {
class IoConnectionTest extends TestCase {
protected $sock;
protected $conn;

Expand Down
5 changes: 3 additions & 2 deletions tests/unit/Server/IoServerTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php
namespace Ratchet\Server;

use Ratchet\Server\IoServer;
use React\EventLoop\StreamSelectLoop;
use React\Socket\Server;

use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Server\IoServer
*/
class IoServerTest extends \PHPUnit_Framework_TestCase {
class IoServerTest extends TestCase {
protected $server;

protected $app;
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/Server/IpBlackListComponentTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php
namespace Ratchet\Server;
use Ratchet\Server\IpBlackList;

use Ratchet\Server\IpBlackList;
use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Server\IpBlackList
*/
class IpBlackListTest extends \PHPUnit_Framework_TestCase {
class IpBlackListTest extends TestCase {
protected $blocker;
protected $mock;

Expand Down
5 changes: 3 additions & 2 deletions tests/unit/Session/Serialize/PhpHandlerTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php
namespace Ratchet\Session\Serialize;
use Ratchet\Session\Serialize\PhpHandler;

use Ratchet\Session\Serialize\PhpHandler;
use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Session\Serialize\PhpHandler
*/
class PhpHandlerTest extends \PHPUnit_Framework_TestCase {
class PhpHandlerTest extends TestCase {
protected $_handler;

public function setUp() {
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php
namespace Ratchet\Session\Storage;

use Ratchet\Session\Serialize\PhpHandler;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
use PHPUnit\Framework\TestCase;

class VirtualSessionStoragePDOTest extends \PHPUnit_Framework_TestCase {
class VirtualSessionStoragePDOTest extends TestCase {
/**
* @var VirtualSessionStorage
*/
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/Wamp/ServerProtocolTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?php
namespace Ratchet\Wamp;

use Ratchet\Mock\Connection;
use Ratchet\Mock\WampComponent as TestComponent;

use PHPUnit\Framework\TestCase;
/**
* @covers \Ratchet\Wamp\ServerProtocol
* @covers \Ratchet\Wamp\WampServerInterface
* @covers \Ratchet\Wamp\WampConnection
*/
class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
class ServerProtocolTest extends TestCase {
protected $_comp;

protected $_app;
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/Wamp/TopicManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
namespace Ratchet\Wamp;

use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Wamp\TopicManager
*/
class TopicManagerTest extends \PHPUnit_Framework_TestCase {
class TopicManagerTest extends TestCase {
private $mock;

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/Wamp/TopicTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
namespace Ratchet\Wamp;

use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Wamp\Topic
*/
class TopicTest extends \PHPUnit_Framework_TestCase {
class TopicTest extends TestCase {
public function testGetId() {
$id = uniqid();
$topic = new Topic($id);
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/Wamp/WampConnectionTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
namespace Ratchet\Wamp;

use PHPUnit\Framework\TestCase;
/**
* @covers Ratchet\Wamp\WampConnection
*/
class WampConnectionTest extends \PHPUnit_Framework_TestCase {
class WampConnectionTest extends TestCase {
protected $conn;
protected $mock;

Expand Down