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); }
public function testGetRaw() { $message = new GenericMessage('test', 'prefix', array(1, 2, 3)); $this->assertEquals(':prefix TEST 1 2 :3', $message->getRaw()); }