isFromUser() public method

Returns whether or not the event originated from a user.
public isFromUser ( ) : TRUE
return TRUE if the event is from a user, FALSE otherwise
Exemplo n.º 1
0
 /**
  * Tests that the event properly detects whether it occurred within a
  * private message from a user.
  *
  * @param mixed   $nick       String containing the user's nick or NULL
  *        if the event is not from a user
  * @param mixed   $username   String containing the user's username or
  *        NULL if the event is not from a user
  * @param boolean $isFromUser TRUE if the event is from a user, FALSE
  *        otherwise
  *
  * @return void
  * @dataProvider dataProviderTestIsFromUser
  */
 public function testIsFromUser($nick, $username, $isFromUser)
 {
     $hostmask = $this->getMockHostmask($nick, $username);
     $this->event->setHostmask($hostmask);
     $this->assertSame($isFromUser, $this->event->isFromUser());
 }