withExecutionContext() 공개 정적인 메소드

public static withExecutionContext ( Symfony\Component\Process\PhpExecutableFinder $phpExecutableFinder, PhpSpec\Process\Context\ExecutionContext $executionContext ) : static
$phpExecutableFinder Symfony\Component\Process\PhpExecutableFinder
$executionContext PhpSpec\Process\Context\ExecutionContext
리턴 static
예제 #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
 /**
  * @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();
     });
 }