當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。