setArguments() public method

Sets the arguments for the request.
public setArguments ( array $arguments ) : Phergie_Event_Request
$arguments array Request arguments
return Phergie_Event_Request Provides a fluent interface
Beispiel #1
0
 /**
  * Tests that the event makes virtual "getter" methods available based
  * on the parameters associated with the event type.
  *
  * @param string $type Event type corresponding to the arguments for
  *        which to test virtual "getter" methods
  * @param array  $args Associative array mapping argument name to its
  *        position starting from 0
  *
  * @return void
  * @dataProvider dataProviderTestProvidesVirtualGetterMethods
  */
 public function testProvidesVirtualGetterMethods($type, array $args)
 {
     $this->event->setType($type);
     $this->event->setArguments(array_keys($args));
     foreach ($args as $name => $position) {
         $this->assertSame($name, $this->event->{'get' . ucfirst($name)}());
     }
 }
Beispiel #2
0
 /**
  * Tests that the event makes virtual "getter" methods available based
  * on the parameters associated with the event type.
  *
  * @return void
  */
 public function testProvidesVirtualGetterMethods()
 {
     $receiver = '#channel';
     $text = 'text';
     $this->event->setType('privmsg');
     $this->event->setArguments(array($receiver, $text));
     $this->assertSame($receiver, $this->event->getReceiver());
     $this->assertSame($text, $this->event->getText());
 }