芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/joolsmen.com/chat/vendor/cboden/ratchet/tests/unit/Wamp/WampServerTest.php
_app->expects($this->once())->method('onPublish')->with( $this->isExpectedConnection() , new \PHPUnit_Framework_Constraint_IsInstanceOf('\Ratchet\Wamp\Topic') , $published , array() , array() ); $this->_serv->onMessage($this->_conn, json_encode(array(7, 'topic', $published))); } public function testGetSubProtocols() { // todo: could expand on this $this->assertInternalType('array', $this->_serv->getSubProtocols()); } public function testConnectionClosesOnInvalidJson() { $this->_conn->expects($this->once())->method('close'); $this->_serv->onMessage($this->_conn, 'invalid json'); } public function testConnectionClosesOnProtocolError() { $this->_conn->expects($this->once())->method('close'); $this->_serv->onMessage($this->_conn, json_encode(array('valid' => 'json', 'invalid' => 'protocol'))); } }