mxmbsocket/tests/Ratchet/Tests/Protocol/WebSocketTest.php
Chris Boden 51d0516aa3 Cleanup
Application stack working!
Existing unit tests fixed
Implemented HyBi-10 unframing
2011-10-28 14:12:39 -04:00

30 lines
887 B
PHP

<?php
namespace Ratchet\Tests\Protocol;
use Ratchet\Protocol\WebSocket;
use Ratchet\Tests\Mock\Socket;
use Ratchet\Tests\Mock\Application;
/**
* @covers Ratchet\Protocol\WebSocket
*/
class WebSocketTest extends \PHPUnit_Framework_TestCase {
protected $_ws;
public function setUp() {
$this->_ws = new WebSocket(new Application);
}
public function testServerImplementsServerInterface() {
$constraint = $this->isInstanceOf('\\Ratchet\\ReceiverInterface');
$this->assertThat($this->_ws, $constraint);
}
public function testServerImplementsProtocolInterface() {
$constraint = $this->isInstanceOf('\\Ratchet\\Protocol\ProtocolInterface');
$this->assertThat($this->_ws, $constraint);
}
public function testGetConfigReturnsArray() {
$this->assertInternalType('array', $this->_ws->getDefaultConfig());
}
}