Beispiel #1
0
 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;
 }
Beispiel #2
0
 /**
  * @test
  */
 public function shouldStartAllTheItems()
 {
     $process = $this->mockProcessWithExpectation('start');
     $processes = new Processes(array($process));
     $this->assertTrue($processes->start());
 }