Ejemplo n.º 1
0
 public function message($type, $message)
 {
     return parent::message($type, $message);
 }
Ejemplo n.º 2
0
 /**
  * Private function that tests an array with implicit flush Html
  *
  * @param $function
  *
  * @author Nikos Dimopoulos <*****@*****.**>
  * @since  2012-11-30
  */
 private function arrayTest($function)
 {
     $flash = new PhFlash($this->classes);
     $class = $this->getClass($function);
     $implicit = '';
     $html = '';
     $template = '<div%s>%s</div>' . PHP_EOL;
     $message = array('sample message 1', 'sample message 2');
     if ($this->notHtml) {
         $flash->setAutomaticHtml(false);
         $html = ' no HTML';
         $expected = $message[0] . $message[1];
     } else {
         $expected = sprintf($template, $class, $message[0]) . sprintf($template, $class, $message[1]);
     }
     if ($this->notImplicit) {
         $flash->setImplicitFlush(false);
         $implicit = ' no implicit';
         $actual = $flash->{$function}($message);
     } else {
         $actual = $this->getObResponse($flash, $function, $message);
     }
     $this->assertEquals($expected, $actual, "Flash\\Direct {$function} (array){$implicit}{$html} does not produce the correct message");
 }