You are here

TestIterator2.php in Zircon Profile 8.0

Same filename and directory in other branches
  1. 8 vendor/phpunit/phpunit/tests/_files/TestIterator2.php

File

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

class TestIterator2 implements Iterator {
  protected $data;
  public function __construct(array $array) {
    $this->data = $array;
  }
  public function current() {
    return current($this->data);
  }
  public function next() {
    next($this->data);
  }
  public function key() {
    return key($this->data);
  }
  public function valid() {
    return key($this->data) !== null;
  }
  public function rewind() {
    reset($this->data);
  }

}

Classes

Namesort descending Description
TestIterator2