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))); }
/** * @depends testActionSenderLogoffDisconnects * @param Client $client * @expectedException Exception */ public function testSendRejectedAfterClose(Client $client) { $this->waitFor($client->request($client->createAction('Ping'))); }