[Http] Fixed broken unit tests
This commit is contained in:
parent
423b5cc355
commit
69afb3de1f
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
namespace Ratchet\Tests\WebSocket\Guzzle\Http\Message;
|
||||
use Ratchet\WebSocket\Guzzle\Http\Message\RequestFactory;
|
||||
namespace Ratchet\Tests\Http\Guzzle\Http\Message;
|
||||
use Ratchet\Http\Guzzle\Http\Message\RequestFactory;
|
||||
|
||||
/**
|
||||
* @covers Ratchet\WebSocket\Guzzle\Http\Message\RequestFactory
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace Ratchet\Tests\WebSocket;
|
||||
use Ratchet\WebSocket\HttpRequestParser;
|
||||
use Ratchet\Tests\Mock\Connection as ConnectionStub;
|
||||
namespace Ratchet\Tests\Http;
|
||||
use Ratchet\Http\HttpRequestParser;
|
||||
|
||||
/**
|
||||
* @covers Ratchet\WebSocket\HttpRequestParser
|
||||
@ -32,7 +31,7 @@ class HttpRequestParserTest extends \PHPUnit_Framework_TestCase {
|
||||
}
|
||||
|
||||
public function testBufferOverflowResponse() {
|
||||
$conn = new ConnectionStub;
|
||||
$conn = $this->getMock('\\Ratchet\\ConnectionInterface');
|
||||
|
||||
$this->parser->maxSize = 20;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Ratchet\Tests\WebSocket\Version;
|
||||
use Ratchet\WebSocket\Version\Hixie76;
|
||||
use Ratchet\Http\HttpServer;
|
||||
use Ratchet\WebSocket\WsServer;
|
||||
|
||||
/**
|
||||
@ -60,7 +61,7 @@ class Hixie76Test extends \PHPUnit_Framework_TestCase {
|
||||
$mockConn = $this->getMock('\\Ratchet\\ConnectionInterface');
|
||||
$mockApp = $this->getMock('\\Ratchet\\MessageComponentInterface');
|
||||
|
||||
$server = new WsServer($mockApp);
|
||||
$server = new HttpServer(new WsServer($mockApp));
|
||||
$server->onOpen($mockConn);
|
||||
$mockApp->expects($this->exactly(0))->method('onOpen');
|
||||
$server->onMessage($mockConn, $headers);
|
||||
@ -73,7 +74,7 @@ class Hixie76Test extends \PHPUnit_Framework_TestCase {
|
||||
$mockConn = $this->getMock('\\Ratchet\\ConnectionInterface');
|
||||
$mockApp = $this->getMock('\\Ratchet\\MessageComponentInterface');
|
||||
|
||||
$server = new WsServer($mockApp);
|
||||
$server = new HttpServer(new WsServer($mockApp));
|
||||
$server->onOpen($mockConn);
|
||||
$server->onMessage($mockConn, $headers);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user