当前位置: 首页>>代码示例>>PHP>>正文


PHP Application::setAutoExit方法代码示例

本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Console\Application::setAutoExit方法的典型用法代码示例。如果您正苦于以下问题:PHP Application::setAutoExit方法的具体用法?PHP Application::setAutoExit怎么用?PHP Application::setAutoExit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Bundle\FrameworkBundle\Console\Application的用法示例。


在下文中一共展示了Application::setAutoExit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 /**
  * Set up test
  */
 public function setUp()
 {
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     static::$application = new Application(static::$kernel);
     static::$application->setAutoExit(false);
 }
开发者ID:sovaalexandr,项目名称:OpenExchangeRatesBundle,代码行数:10,代码来源:OpenExchangeRatesServiceTest.php

示例2: setUp

 protected function setUp()
 {
     $kernel = new TestKernel('test', true);
     $kernel->boot();
     $this->application = new Application($kernel);
     // Without this, the application will call the PHP exit() function
     $this->application->setAutoExit(false);
 }
开发者ID:sarelvdwalt,项目名称:BaseCommandBundle,代码行数:8,代码来源:AbstractContainerTest.php

示例3: setUp

 protected function setUp()
 {
     self::bootKernel();
     $this->application = new Application(self::$kernel);
     $this->application->setAutoExit(false);
     $this->runConsole("doctrine:schema:drop", ["--force" => true]);
     $this->runConsole("doctrine:schema:create");
 }
开发者ID:ronanguilloux,项目名称:AliceBundle,代码行数:8,代码来源:CommandTestCase.php

示例4: setUp

 public function setUp()
 {
     $this->client = $this->createClient();
     $this->app = new Application($this->client->getKernel());
     $this->app->setAutoExit(false);
     $this->em = static::$kernel->getContainer()->get('doctrine')->getManager();
     $this->router = static::$kernel->getContainer()->get('router');
 }
开发者ID:hasantayyar,项目名称:ojs,代码行数:8,代码来源:BaseTestCase.php

示例5: setUp

 protected function setUp()
 {
     $this->bootKernel();
     $this->application = new Application(self::$kernel);
     $this->application->setAutoExit(false);
     $this->runCommand('doctrine:schema:drop --force');
     $this->runCommand('doctrine:schema:create');
 }
开发者ID:dunglas,项目名称:doctrine-json-odm,代码行数:8,代码来源:FunctionalTest.php

示例6: getApplication

 /**
  * @return Application
  */
 protected function getApplication()
 {
     if (!$this->application) {
         $this->application = new Application($this->get('kernel'));
         $this->application->setAutoExit(false);
     }
     return $this->application;
 }
开发者ID:Maksold,项目名称:platform,代码行数:11,代码来源:AbstractStep.php

示例7: setUp

 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     self::bootKernel();
     $this->container = static::$kernel->getContainer();
     $this->application = new Application(static::$kernel);
     $this->application->setAutoExit(false);
     $this->application->setCatchExceptions(false);
 }
开发者ID:aboutcoders,项目名称:enum-serializer-bundle,代码行数:11,代码来源:ServiceConfigurationTest.php

示例8: initialize

 /**
  * @param InputInterface $input
  * @param OutputInterface $output
  */
 protected function initialize(InputInterface $input, OutputInterface $output)
 {
     $this->io = new SymfonyStyle($input, $output);
     $this->container = $this->getContainer();
     $this->apiViews = $this->container->get('ojs_api.twig.api_extension')->getApiViews();
     $this->kernel = $this->container->get('kernel');
     $this->application = new Application($this->kernel);
     $this->application->setAutoExit(false);
 }
开发者ID:ojs,项目名称:ojs,代码行数:13,代码来源:ApiDocsDumpCommand.php

示例9: setUp

 /**
  * {@inheritDoc}
  */
 public function setUp()
 {
     self::bootKernel();
     $this->container = static::$kernel->getContainer();
     $this->application = new Application(static::$kernel);
     $this->application->setAutoExit(false);
     $this->application->setCatchExceptions(false);
     $this->function_exists = $this->getFunctionMock('Abc\\ProcessControl', 'function_exists');
 }
开发者ID:aboutcoders,项目名称:process-control-bundle,代码行数:12,代码来源:BundleIntegrationTest.php

示例10: runCommand

 private static function runCommand($commandName, $options = array())
 {
     $options["-e"] = self::$kernel->getEnvironment();
     $options['command'] = $commandName;
     $input = new ArrayInput($options);
     $output = new NullOutput();
     static::$application->setAutoExit(false);
     self::$application->run($input, $output);
 }
开发者ID:rvanlaarhoven,项目名称:LexikTranslationBundle,代码行数:9,代码来源:ImportTranslationsCommandTest.php

示例11: getApplication

 /**
  * @return App
  */
 protected static function getApplication()
 {
     if (null === self::$application) {
         $client = static::createClient();
         self::$application = new App($client->getKernel());
         self::$application->setAutoExit(false);
     }
     return self::$application;
 }
开发者ID:modpreneur,项目名称:trinity-settings,代码行数:12,代码来源:WebTestCase.php

示例12: setUp

 /**
  * {@inheritDoc}
  */
 protected function setUp()
 {
     $this->logger = $this->getMock('Symfony\\Bridge\\Monolog\\Logger', ['log'], ['name' => 'console.chain']);
     $kernel = new \AppKernel('test', false);
     $this->application = new Application($kernel);
     $this->application->setAutoExit(false);
     $kernel->boot();
     $kernel->getContainer()->set('chain_command.logger', $this->logger);
 }
开发者ID:relo-san,项目名称:CommandChainTest,代码行数:12,代码来源:ChainCommandTest.php

示例13: setupSubject

 /**
  * @before
  */
 public function setupSubject()
 {
     $this->supervisorManager = $this->getMockBuilder('YZ\\SupervisorBundle\\Manager\\SupervisorManager')->disableOriginalConstructor()->getMock();
     self::bootKernel();
     static::$kernel->getContainer()->set('supervisor.manager', $this->supervisorManager);
     $this->application = new Application(static::$kernel);
     $this->application->setAutoExit(false);
     $this->application->setCatchExceptions(false);
 }
开发者ID:aboutcoders,项目名称:supervisor-command-bundle,代码行数:12,代码来源:SupervisorListCommandTest.php

示例14: getApplication

 protected static function getApplication()
 {
     if (null === self::$application) {
         $client = static::createClient();
         self::$application = new \Symfony\Bundle\FrameworkBundle\Console\Application($client->getKernel());
         self::$application->setAutoExit(false);
     }
     return self::$application;
 }
开发者ID:pigroupe,项目名称:SfynxAuthBundle,代码行数:9,代码来源:WebTestCase.php

示例15: getApplication

 /**
  * @return Application
  */
 private static function getApplication()
 {
     if (null === self::$application) {
         self::$client = static::createClient();
         self::$application = new Application(self::$kernel);
         self::$application->setAutoExit(false);
     }
     return self::$application;
 }
开发者ID:trivialsense,项目名称:php-framework-common,代码行数:12,代码来源:FunctionalTest.php


注:本文中的Symfony\Bundle\FrameworkBundle\Console\Application::setAutoExit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。