/** * 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()); }