public function shouldCreateProcessesWithoutBeforeProcessExecutingFactoryWithTheCorrectArguments()
{
$queue = $this->getMock('Liuggio\\Fastest\\Queue\\QueueInterface');
$queue->expects($this->once())->method('isEmpty')->willReturn(false);
$queue->expects($this->once())->method('pop')->willReturn(new TestSuite('path'));
$processes = $this->getMockBuilder('Liuggio\\Fastest\\Process\\Processes')->disableOriginalConstructor()->getMock();
$processes->expects($this->once())->method('getIndexesOfCompletedChannel')->willReturn(array(1));
$factory = $this->getMockBuilder('Liuggio\\Fastest\\Process\\ProcessFactory')->disableOriginalConstructor()->getMock();
$factory->expects($this->exactly(1))->method('createAProcess')->with($this->anything(), $this->equalTo(1), $this->equalTo(1), $this->equalTo(true))->willReturn(new Process('echo ', rand()));
$manager = new ProcessesManager($factory, 1);
$this->assertTrue($manager->assertNProcessRunning($queue, $processes));
}