ForkingIteratorTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testMainFunctionality() 0 7 2
A testExceptionHandling() 0 8 2
1
<?php
2
3
namespace itertools;
4
5
use Exception;
6
use PHPUnit_Framework_TestCase;
7
8
9
class ForkingIteratorTest extends PHPUnit_Framework_TestCase
10
{
11
	/** @test */
12
	public function testMainFunctionality()
13
	{
14
		$this->markTestIncomplete('These fail and should be fixed as soon as possible');
15
		foreach(new ForkingIterator(range(0, 20), array('maxChildren' => 3)) as $i)
16
		{
17
		}
18
	}
19
20
	/**
21
	 * @test
22
	 * @expectedException UnexpectedValueException
23
	 * @expectedExceptionMessage Child exited with non zero status
24
	 */
25
	public function testExceptionHandling()
26
	{
27
		$this->markTestIncomplete('These fail and should be fixed as soon as possible');
28
		foreach(new ForkingIterator(range(0, 20), array('maxChildren' => 3)) as $i)
29
		{
30
			exit(1);
31
		}
32
	}
33
}
34
35