diff --git a/src/LinusShops/Prophet/Commands/Scry/PhpUnit.php b/src/LinusShops/Prophet/Commands/Scry/PhpUnit.php index f029271..ee35d6f 100644 --- a/src/LinusShops/Prophet/Commands/Scry/PhpUnit.php +++ b/src/LinusShops/Prophet/Commands/Scry/PhpUnit.php @@ -18,11 +18,11 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\EventDispatcher\EventDispatcher; class PhpUnit extends Scry { private $isolated; + private $noIsolate; protected function configure() { @@ -38,6 +38,12 @@ protected function configure() 'Indicates to prophet that it is running as a subprocess, and'. ' should assume it has only one module to run.' ) + ->addOption( + 'no-isolate', + null, + InputOption::VALUE_NONE, + 'Disable process isolation of tests' + ) ; } @@ -50,9 +56,9 @@ private function isIsolated() public function doTest(Module $module, InputInterface $input, OutputInterface $output) { $this->isolated = $input->getOption('isolated'); - $dispatcher = new EventDispatcher(); + $this->noIsolate = $input->getOption('no-isolate'); - if (!$this->isIsolated()) { + if (!$this->isIsolated() && !$this->noIsolate) { $output->writeln("Isolating {$module->getName()}"); $cmd = $this->getProphetCall() . " scry:phpunit --isolated -m {$module->getName()} -p {$input->getOption('path')}";