private function createProcessesForTheBeforeCommand($range, Processes &$processes = null) { foreach ($range as $currentChannel) { $currentProcessNumber = $this->getCurrentProcessCounter(); $this->incrementForThisChannel($currentChannel); $process = $this->processFactory->createAProcessForACustomCommand($this->beforeCommand, $currentChannel, $currentProcessNumber, $this->isFirstForThisChannel($currentChannel)); $processes->add($currentChannel, $process); $processes->start($currentChannel); } return true; }
/** * @test */ public function shouldStartAllTheItems() { $process = $this->mockProcessWithExpectation('start'); $processes = new Processes(array($process)); $this->assertTrue($processes->start()); }