From 22c527fb32cda87c8e6fc05439ad28aadc7c14f8 Mon Sep 17 00:00:00 2001 From: benoitpotier Date: Fri, 31 Mar 2017 11:46:24 +0200 Subject: [PATCH] add tests repository --- tests/test.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/test.php 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