TakeWhileIteratorTest::testMainFunctionality()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace itertools;
4
5
use PHPUnit_Framework_TestCase;
6
7
8
class TakeWhileIteratorTest extends PHPUnit_Framework_TestCase {
9
10
	/** @test */
11
	public function testMainFunctionality() {
12
		$it = new TakeWhileIterator(range(0, 100), function($i) { return $i < 5; });
13
		$this->assertEquals(5, count(iterator_to_array($it)));
14
	}
15
}
16
17