private function startWorkers() { $wrapper = realpath(__DIR__ . '/../../../../bin/phpunit-wrapper'); for ($i = 1; $i <= $this->options->processes; $i++) { $worker = new Worker(); if ($this->options->noTestTokens) { $token = null; } else { $token = $i; } $worker->start($wrapper, $token); $this->streams[] = $worker->stdout(); $this->workers[] = $worker; } }
public function testCanExecuteMultiplePHPUnitCommands() { $bin = 'bin/phpunit-wrapper'; $worker = new Worker(); $worker->start($this->phpunitWrapper); $testLog = '/tmp/test.xml'; $testCmd = $this->getCommand('TestOfUnits.php', $testLog); $worker->execute($testCmd); $testLog2 = '/tmp/test2.xml'; $testCmd2 = $this->getCommand('UnitTestWithErrorTest.php', $testLog2); $worker->execute($testCmd2); $worker->stop(); $worker->waitForStop(); $this->assertJUnitLogIsValid($testLog); $this->assertJUnitLogIsValid($testLog2); }