push() public method

Adds an item to the queue.
public push ( mixed $item, mixed $eta = null )
$item mixed An item to be added.
$eta mixed The earliest time that an item can be popped.
Beispiel #1
0
 /**
  * @dataProvider provideItemsOfSupportedTypes
  */
 public function testSupportItemType($item, $type)
 {
     $this->queue->push($item);
     if (Types::TYPE_BINARY_STRING === $type) {
         // strict comparison
         $this->assertSame($item, $this->queue->pop());
     } else {
         // loose comparison
         $this->assertEquals($item, $this->queue->pop());
     }
 }