Esempio n. 1
0
 public function testHandleMessage()
 {
     $mock = $this->getMock('\\Buttress\\IRC\\Connection\\ConnectionInterface');
     $mock->expects($this->once())->method('disconnect');
     $action = new ErrorAction();
     $action->handleConnect($mock);
     $message = new GenericMessage('error');
     $message->setConnection($mock);
     $action->handleMessage($message);
 }
Esempio n. 2
0
 public function testGetRaw()
 {
     $message = new GenericMessage('test', 'prefix', array(1, 2, 3));
     $this->assertEquals(':prefix TEST 1 2 :3', $message->getRaw());
 }