for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace itertools;
use PHPUnit_Framework_TestCase;
class TakeWhileIteratorTest extends PHPUnit_Framework_TestCase {
/** @test */
public function testMainFunctionality() {
$it = new TakeWhileIterator(range(0, 100), function($i) { return $i < 5; });
$this->assertEquals(5, count(iterator_to_array($it)));
}