芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/joolsmen.com/chat/vendor/cboden/ratchet/tests/unit/Server/EchoServerTest.php
_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(); } }