You are here

StackTest.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/_files/StackTest.php

File

vendor/phpunit/phpunit/tests/_files/StackTest.php
View source
<?php

class StackTest extends PHPUnit_Framework_TestCase {
  public function testPush() {
    $stack = array();
    $this
      ->assertEquals(0, count($stack));
    array_push($stack, 'foo');
    $this
      ->assertEquals('foo', $stack[count($stack) - 1]);
    $this
      ->assertEquals(1, count($stack));
    return $stack;
  }

  /**
   * @depends testPush
   */
  public function testPop(array $stack) {
    $this
      ->assertEquals('foo', array_pop($stack));
    $this
      ->assertEquals(0, count($stack));
  }

}

Classes

Namesort descending Description
StackTest