go() public static méthode

Send all messages in the queue.
public static go ( ) : void
Résultat void
Exemple #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();
 }