Example #1
0
 /**
  * Test options
  */
 public function testOptions()
 {
     $options = new CallbackOptions();
     $this->assertTrue(is_callable($options->getCallback()));
     $this->setExpectedException('InvalidArgumentException');
     $options->setCallback(0);
 }
Example #2
0
 /**
  * Send a mail message
  *
  * @param   Message $message
  * @return  mixed
  */
 public function send(Message $message)
 {
     $callback = $this->options->getCallback();
     return $callback($message, $this);
 }