示例#1
0
 /** @test */
 public function itShouldNotBeConnectedAfterDisconnection()
 {
     $input = $this->createInputStreamMock();
     $output = $this->getMock('React\\Stomp\\Io\\OutputStreamInterface');
     $client = new Client($this->createLoopMockWithConnectionTimer(), $input, $output, array('vhost' => 'localhost'));
     $client->connect();
     $frame = new Frame('CONNECTED', array('session' => '1234', 'server' => 'React/alpha'));
     $input->emit('frame', array($frame));
     $client->disconnect();
     $this->assertFalse($client->isConnected());
 }