Returns whether or not the event originated from the server.
public isFromServer ( ) : TRUE | ||
return | TRUE | if the event is from the server, FALSE otherwise |
/** * Tests that the event properly detects whether the server (versus a * user) originated it. * * @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 $isFromServer TRUE if the event is from the server, * FALSE otherwise * * @return void * @dataProvider dataProviderTestIsFromServer */ public function testIsFromServer($nick, $username, $isFromServer) { $hostmask = $this->getMockHostmask($nick, $username); $this->event->setHostmask($hostmask); $this->assertSame($isFromServer, $this->event->isFromServer()); }