Exemplo n.º 1
0
 public function testUnexpectedResponseEmitsErrorAndClosesClient()
 {
     $client = new Client($this->createStreamMock());
     $client->on('error', $this->expectCallableOnce());
     $client->on('close', $this->expectCallableOnce());
     $client->handleMessage(new Response(array('ActionID' => 1)));
 }
Exemplo n.º 2
0
 /**
  * @depends testActionSenderLogoffDisconnects
  * @param Client $client
  * @expectedException Exception
  */
 public function testSendRejectedAfterClose(Client $client)
 {
     $this->waitFor($client->request($client->createAction('Ping')));
 }