PairIteratorTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testPairIterator() 0 9 2
1
<?php
2
3
namespace itertools;
4
5
use PHPUnit_Framework_TestCase;
6
7
class PairIteratorTest extends PHPUnit_Framework_TestCase
8
{
9
    /** @test */
10
    public function testPairIterator()
11
    {
12
        $count = 0;
13
        foreach (new PairIterator(range(0, 10)) as $pair) {
14
            $this->assertEquals(array($count, $count + 1), $pair);
15
            $count += 1;
16
        }
17
        $this->assertEquals(10, $count);
18
    }
19
}
20