You are here

public function StackTest::testPush in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/_files/StackTest.php \StackTest::testPush()

File

vendor/phpunit/phpunit/tests/_files/StackTest.php, line 4

Class

StackTest

Code

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;
}