本文整理汇总了PHP中Ratchet\ConnectionInterface::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP ConnectionInterface::expects方法的具体用法?PHP ConnectionInterface::expects怎么用?PHP ConnectionInterface::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ratchet\ConnectionInterface
的用法示例。
在下文中一共展示了ConnectionInterface::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testMessageHandling
/**
* Tests that requests from clients are sent back as responses
*/
public function testMessageHandling()
{
$authenticationRequest = new AuthenticationRequest($this->configuration->getAccessToken());
// Authenticate the client
$this->_manager->handleMessage($authenticationRequest, $this->_clientMock);
$expectedResponse = new AuthenticationResponse(AuthenticationResponse::STATUS_SUCCESS);
$this->_clientMock->expects($this->once())->method('send')->with(json_encode($expectedResponse));
$this->_manager->onMessage($this->_clientMock, json_encode($authenticationRequest));
}