Exemplo n.º 1
0
 public function testQueue()
 {
     $queue = new Queue();
     $method = $this->getMock('Helthe\\Component\\Segmentio\\Method\\MethodInterface');
     $queue->enqueue($method);
     $this->assertSame($method, $queue->dequeue());
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function track($event, array $properties = array())
 {
     $this->queue->enqueue(new TrackMethod($event, $properties));
 }
Exemplo n.º 3
0
 /**
  * Renders a queue of library methods.
  *
  * @return string
  */
 public function renderQueue(Queue $queue)
 {
     $render = '';
     while ($method = $queue->dequeue(MethodInterface::BROWSER_PLATFORM)) {
         $render .= $this->renderMethod($method) . "\n";
     }
     return trim($render);
 }