/** * @test */ public function shouldWaitAllTheItems() { $process = $this->getMockBuilder('\\Symfony\\Component\\Process\\Process')->disableOriginalConstructor()->getMock(); $process->expects($this->exactly(5))->method('isTerminated')->willReturn(false)->willReturnOnConsecutiveCalls(false, false, false, true); $processes = new Processes(array($process)); $this->assertTrue($processes->wait()); }
/** * @test */ public function shouldWaitAllTheItems() { $process = $this->mockProcessWithExpectation('wait'); $processes = new Processes(array($process)); $this->assertTrue($processes->wait()); }