isInChannel() public method

Returns whether or not the event occurred within a channel.
public isInChannel ( ) : TRUE
return TRUE if the event is in a channel, FALSE otherwise
Beispiel #1
0
 /**
  * Tests that the event properly detects whether it occurred within a
  * channel.
  *
  * @param string  $source      Event source
  * @param boolean $isInChannel TRUE if the event occurred in a channel,
  *        FALSE otherwise
  *
  * @return void
  * @depends testGetSourceWithChannel
  * @depends testGetSourceWithUser
  * @dataProvider dataProviderTestIsInChannel
  */
 public function testIsInChannel($source, $isInChannel)
 {
     $hostmask = $this->getMockHostmask('nick');
     $this->event->setHostmask($hostmask);
     $this->event->setType('privmsg');
     $this->event->setArguments(array($source, 'text'));
     $this->assertSame($isInChannel, $this->event->isInChannel());
 }