Esempio n. 1
0
 /**
  * Tests setParams().
  */
 public function testSetParams()
 {
     $params = array('foo' => 'bar');
     $this->event->setParams($params);
     $this->assertSame($params, $this->event->getParams());
 }
 /**
  * Primes an Event object with data.
  *
  * @param \Phergie\Irc\Event\Event $event
  */
 protected function initializeEvent(Event $event)
 {
     $connection = Phake::mock('\\Phergie\\Irc\\ConnectionInterface');
     Phake::when($connection)->getServerHostname()->thenReturn($this->connection['serverHostname']);
     Phake::when($connection)->getServerPort()->thenReturn($this->connection['serverPort']);
     Phake::when($connection)->getNickname()->thenReturn($this->connection['nickname']);
     Phake::when($connection)->getUsername()->thenReturn($this->connection['username']);
     Phake::when($connection)->getHostname()->thenReturn($this->connection['hostname']);
     Phake::when($connection)->getServername()->thenReturn($this->connection['servername']);
     Phake::when($connection)->getRealname()->thenReturn($this->connection['realname']);
     $event->setConnection($connection);
     $event->setCommand($this->event['command']);
     $event->setParams($this->event['params']);
     $event->setMessage($this->event['message']);
 }