Example #1
0
 /**
  * Test the `shift` method.
  */
 public function testShift()
 {
     /* @var \com\mohiva\common\parser\Token $token1 */
     /* @var \com\mohiva\common\parser\Token $token2 */
     $token1 = $this->getMock('\\com\\mohiva\\common\\parser\\Token');
     $token2 = $this->getMock('\\com\\mohiva\\common\\parser\\Token');
     $list = new SplDoublyLinkedList();
     $list->push($token1);
     $list->push($token2);
     $stream = new TokenStream($list);
     $this->assertSame($token1, $stream->shift());
 }