We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1207c2 commit 541588fCopy full SHA for 541588f
tests/CollectionTest.php
@@ -0,0 +1,17 @@
1
+<?php
2
+class CollectionTest extends PHPUnit_Framework_TestCase
3
+{
4
+ public function testPushAndPop()
5
+ {
6
+ $stack = array();
7
+ $this->assertEquals(0, count($stack));
8
+
9
+ array_push($stack, 'foo');
10
+ $this->assertEquals('foo', $stack[count($stack)-1]);
11
+ $this->assertEquals(1, count($stack));
12
13
+ $this->assertEquals('foo', array_pop($stack));
14
15
+ }
16
+}
17
0 commit comments