Yaffs site version 1.1
[yaffs-website] / vendor / phpunit / phpunit / tests / _files / StackTest.php
1 <?php
2 class StackTest extends PHPUnit_Framework_TestCase
3 {
4     public function testPush()
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         return $stack;
14     }
15
16     /**
17      * @depends testPush
18      */
19     public function testPop(array $stack)
20     {
21         $this->assertEquals('foo', array_pop($stack));
22         $this->assertEquals(0, count($stack));
23     }
24 }