404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.216.67.94: ~ $
<?php
namespace Ratchet\Application\Server;
use Ratchet\Server\IoConnection;

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

    public function setUp() {
        $this->sock = $this->getMock('\\React\\Socket\\ConnectionInterface');
        $this->conn = new IoConnection($this->sock);
    }

    public function testCloseBubbles() {
        $this->sock->expects($this->once())->method('end');
        $this->conn->close();
    }

    public function testSendBubbles() {
        $msg = '6 hour rides are productive';

        $this->sock->expects($this->once())->method('write')->with($msg);
        $this->conn->send($msg);
    }

    public function testSendReturnsSelf() {
        $this->assertSame($this->conn, $this->conn->send('fluent interface'));
    }
}

Filemanager

Name Type Size Permission Actions
EchoServerTest.php File 802 B 0644
FlashPolicyComponentTest.php File 4.71 KB 0644
IoConnectionTest.php File 867 B 0644
IoServerTest.php File 3.85 KB 0644
IpBlackListComponentTest.php File 3.44 KB 0644