/**
  * Checks that user event data has been converted.
  *
  * @param array $data
  * @param \Phergie\Irc\Event\UserEvent $event
  */
 protected function checkUserEventData(array $data, UserEvent $event)
 {
     $this->assertSame($data['prefix'], $event->getPrefix());
     $this->assertSame($data['nick'], $event->getNick());
     $this->assertSame($data['user'], $event->getUsername());
     $this->assertSame($data['host'], $event->getHost());
     $this->assertSame($data['message'], $event->getMessage());
     $this->assertSame($data['command'], $event->getCommand());
     $this->assertSame($data['targets'], $event->getTargets());
 }
Ejemplo n.º 2
0
 /**
  * Tests setUsername().
  */
 public function testSetUsername()
 {
     $username = '******';
     $this->event->setUsername($username);
     $this->assertSame($username, $this->event->getUsername());
 }