Exemple #1
0
 /**
  * @depends testPushOne
  */
 function testPeekOne()
 {
     $stack = new LinkedStack();
     $stack->push(1);
     $item = $stack->last();
     $this->assertEquals(1, $item);
     $this->assertFalse($stack->isEmpty());
     $this->assertCount(1, $stack);
 }
 /**
  * @expectedException \Collections\EmptyException
  */
 function testPeekEmpty()
 {
     $stack = new LinkedStack();
     $stack->last();
 }