_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()); } }