2 class StackTest extends PHPUnit_Framework_TestCase
4 public function testPush()
7 $this->assertEquals(0, count($stack));
9 array_push($stack, 'foo');
10 $this->assertEquals('foo', $stack[count($stack)-1]);
11 $this->assertEquals(1, count($stack));
19 public function testPop(array $stack)
21 $this->assertEquals('foo', array_pop($stack));
22 $this->assertEquals(0, count($stack));