addHtml() public static method

Add a html message to the queue.
public static addHtml ( string $msg, boolean $notify = false, string $background = Message::BACKGROUND_YELLOW ) : void
$msg string
$notify boolean
$background string
return void
Example #1
0
 public function testSendQueue()
 {
     $entity = m::mock('Guzzle\\Http\\Message\\EntityEnclosingRequest');
     $entity->shouldReceive('send')->times(3);
     $data = array('room_id' => 'egg', 'from' => 'spoon', 'message' => 'hello world', 'message_format' => 'html', 'notify' => false, 'color' => 'yellow', 'format' => 'json');
     $http = m::mock('Guzzle\\Http\\Client');
     $http->shouldReceive('post')->andReturn($entity)->times(3);
     $transport = new Guzzle('123', 'egg', 'spoon');
     $transport->setHttp($http);
     Hippy::init(null, null, null, $transport);
     Hippy::add('test 1');
     Hippy::addHtml('test 2');
     Hippy::add('test 3');
     Hippy::go();
 }