404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.17.76.135: ~ $
<?php
namespace Ratchet\Server;
use Ratchet\Server\EchoServer;

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

    public function setUp() {
        $this->_conn = $this->getMock('\Ratchet\ConnectionInterface');
        $this->_comp = new EchoServer;
    }

    public function testMessageEchod() {
        $message = 'Tillsonburg, my back still aches when I hear that word.';
        $this->_conn->expects($this->once())->method('send')->with($message);
        $this->_comp->onMessage($this->_conn, $message);
    }

    public function testErrorClosesConnection() {
        ob_start();
        $this->_conn->expects($this->once())->method('close');
        $this->_comp->onError($this->_conn, new \Exception);
        ob_end_clean();
    }
}

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