Ejemplo n.º 1
0
 /**
  * @depends testPushOne
  */
 function testPopOne()
 {
     $stack = new LinkedStack();
     $stack->push(1);
     $item = $stack->pop();
     $this->assertEquals(1, $item);
     $this->assertTrue($stack->isEmpty());
     $this->assertCount(0, $stack);
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \Collections\EmptyException
  */
 function testPopEmpty()
 {
     $stack = new LinkedStack();
     $stack->pop();
 }