Inheritance: extends PhpSpec\Process\ReRunner\PhpExecutableReRunner
コード例 #1
0
 /**
  * @param ServiceContainer $container
  */
 private function setupRerunner(ServiceContainer $container)
 {
     $container->setShared('process.rerunner', function (ServiceContainer $c) {
         return new ReRunner\OptionalReRunner($c->get('process.rerunner.platformspecific'), $c->get('console.io'));
     });
     if ($container->isDefined('process.rerunner.platformspecific')) {
         return;
     }
     $container->setShared('process.rerunner.platformspecific', function (ServiceContainer $c) {
         return new ReRunner\CompositeReRunner($c->getByPrefix('process.rerunner.platformspecific'));
     });
     $container->setShared('process.rerunner.platformspecific.pcntl', function (ServiceContainer $c) {
         return ReRunner\PcntlReRunner::withExecutionContext($c->get('process.phpexecutablefinder'), $c->get('process.executioncontext'));
     });
     $container->setShared('process.rerunner.platformspecific.passthru', function (ServiceContainer $c) {
         return ReRunner\PassthruReRunner::withExecutionContext($c->get('process.phpexecutablefinder'), $c->get('process.executioncontext'));
     });
     $container->setShared('process.rerunner.platformspecific.windowspassthru', function (ServiceContainer $c) {
         return ReRunner\WindowsPassthruReRunner::withExecutionContext($c->get('process.phpexecutablefinder'), $c->get('process.executioncontext'));
     });
     $container->setShared('process.phpexecutablefinder', function () {
         return new PhpExecutableFinder();
     });
 }
コード例 #2
0
ファイル: ContainerAssembler.php プロジェクト: GeeH/phpspec
 /**
  * @param IndexedServiceContainer $container
  */
 private function setupRerunner(IndexedServiceContainer $container)
 {
     $container->define('process.rerunner', function (IndexedServiceContainer $c) {
         return new ReRunner\OptionalReRunner($c->get('process.rerunner.platformspecific'), $c->get('console.io'));
     });
     if ($container->has('process.rerunner.platformspecific')) {
         return;
     }
     $container->define('process.rerunner.platformspecific', function (IndexedServiceContainer $c) {
         return new ReRunner\CompositeReRunner($c->getByTag('process.rerunner.platformspecific'));
     });
     $container->define('process.rerunner.platformspecific.pcntl', function (IndexedServiceContainer $c) {
         return ReRunner\PcntlReRunner::withExecutionContext($c->get('process.phpexecutablefinder'), $c->get('process.executioncontext'));
     }, ['process.rerunner.platformspecific']);
     $container->define('process.rerunner.platformspecific.passthru', function (IndexedServiceContainer $c) {
         return ReRunner\ProcOpenReRunner::withExecutionContext($c->get('process.phpexecutablefinder'), $c->get('process.executioncontext'));
     }, ['process.rerunner.platformspecific']);
     $container->define('process.rerunner.platformspecific.windowspassthru', function (IndexedServiceContainer $c) {
         return ReRunner\WindowsPassthruReRunner::withExecutionContext($c->get('process.phpexecutablefinder'), $c->get('process.executioncontext'));
     }, ['process.rerunner.platformspecific']);
     $container->define('process.phpexecutablefinder', function () {
         return new PhpExecutableFinder();
     });
 }