TakeWhileIteratorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testMainFunctionality() 0 4 1
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