getNick() public méthode

Returns the nick of the user who originated the event.
public getNick ( ) : string
Résultat string
 /**
  * Tests that the nick of the user who originated the event can be
  * retrieved.
  *
  * @return void
  * @depends testSetHostmask
  */
 public function testGetNick()
 {
     $expected = 'nick';
     $hostmask = $this->getMockHostmask($expected);
     $this->event->setHostmask($hostmask);
     $actual = $this->event->getNick();
     $this->assertSame($expected, $actual);
 }
Exemple #2
0
 /**
  * Checks for an expected karma response.
  *
  * @param Phergie_Event_Request $event    Event containing the karma
  *                                        request
  * @param string                $term     Karma term
  * @param string                $response Portion of the response
  *                                        message following the term
  *                                        from the original event
  *
  * @return void
  */
 private function checkForKarmaResponse($event, $term, $response)
 {
     $text = $event->getNick() . ': ' . $response;
     $this->assertEmitsEvent('privmsg', array($event->getSource(), $text));
     $this->plugin->onCommandKarma($term);
 }