diff --git a/tests/test.php b/tests/test.php new file mode 100644 index 0000000..4ddc6e2 --- /dev/null +++ b/tests/test.php @@ -0,0 +1,32 @@ +assertEmpty($stack); + + return $stack; + } + + /** + * @depends testEmpty + */ + public function testPush(array $stack) + { + array_push($stack, 'foo'); + $this->assertEquals('foo', $stack[count($stack)-1]); + $this->assertNotEmpty($stack); + + return $stack; + } + + /** + * @depends testPush + */ + public function testPop(array $stack) + { + $this->assertEquals('foo', array_pop($stack)); + $this->assertEmpty($stack); + } +} \ No newline at end of file