/** * Test the `bottom` method. */ public function testBottom() { /* @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->bottom()); }