/** * @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); }
/** * @expectedException \Collections\EmptyException */ function testPopEmpty() { $stack = new LinkedStack(); $stack->pop(); }