當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Debug::setOutput方法代碼示例

本文整理匯總了PHP中Codeception\Util\Debug::setOutput方法的典型用法代碼示例。如果您正苦於以下問題:PHP Debug::setOutput方法的具體用法?PHP Debug::setOutput怎麽用?PHP Debug::setOutput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Codeception\Util\Debug的用法示例。


在下文中一共展示了Debug::setOutput方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($options)
 {
     $this->debug = $options['debug'] || $options['verbosity'] >= OutputInterface::VERBOSITY_VERY_VERBOSE;
     $this->steps = $this->debug || $options['steps'];
     $this->output = new Output($options);
     if ($this->debug) {
         Debug::setOutput($this->output);
     }
 }
開發者ID:lenninsanchez,項目名稱:donadores,代碼行數:9,代碼來源:Console.php

示例2: __construct

 public function __construct($options)
 {
     $this->options = $options;
     $this->debug = $options['debug'] || $options['verbosity'] >= OutputInterface::VERBOSITY_VERY_VERBOSE;
     $this->steps = $this->debug || $options['steps'];
     $this->rawStackTrace = $options['verbosity'] === OutputInterface::VERBOSITY_DEBUG;
     $this->output = new Output($options);
     if ($this->debug) {
         Debug::setOutput($this->output);
     }
     foreach (['html', 'xml', 'tap', 'json'] as $report) {
         if (!$this->options[$report]) {
             continue;
         }
         $path = $this->absolutePath($this->options[$report]);
         $this->reports[] = sprintf("- <bold>%s</bold> report generated in <comment>file://%s</comment>", strtoupper($report), $path);
     }
 }
開發者ID:vladislavl-hyuna,項目名稱:crmapp,代碼行數:18,代碼來源:Console.php

示例3: execute

 public function execute(InputInterface $input, OutputInterface $output)
 {
     $suiteName = $input->getArgument('suite');
     $this->output = $output;
     $config = Configuration::config($input->getOption('config'));
     $settings = Configuration::suiteSettings($suiteName, $config);
     $options = $input->getOptions();
     $options['debug'] = true;
     $options['silent'] = true;
     $options['interactive'] = false;
     $options['colors'] = true;
     Debug::setOutput(new Output($options));
     $this->codecept = new Codecept($options);
     $dispatcher = $this->codecept->getDispatcher();
     $suiteManager = new SuiteManager($dispatcher, $suiteName, $settings);
     $suiteManager->initialize();
     $this->suite = $suiteManager->getSuite();
     $moduleContainer = $suiteManager->getModuleContainer();
     $this->actions = array_keys($moduleContainer->getActions());
     $this->test = (new Cept())->configDispatcher($dispatcher)->configModules($moduleContainer)->configName('')->config('file', '')->initConfig();
     $scenario = new Scenario($this->test);
     if (isset($config["namespace"])) {
         $settings['class_name'] = $config["namespace"] . '\\' . $settings['class_name'];
     }
     $actor = $settings['class_name'];
     $I = new $actor($scenario);
     $this->listenToSignals();
     $output->writeln("<info>Interactive console started for suite {$suiteName}</info>");
     $output->writeln("<info>Try Codeception commands without writing a test</info>");
     $output->writeln("<info>type 'exit' to leave console</info>");
     $output->writeln("<info>type 'actions' to see all available actions for this suite</info>");
     $suiteEvent = new SuiteEvent($this->suite, $this->codecept->getResult(), $settings);
     $dispatcher->dispatch(Events::SUITE_BEFORE, $suiteEvent);
     $dispatcher->dispatch(Events::TEST_PARSED, new TestEvent($this->test));
     $dispatcher->dispatch(Events::TEST_BEFORE, new TestEvent($this->test));
     $output->writeln("\n\n<comment>\$I</comment> = new {$settings['class_name']}(\$scenario);");
     $scenario->stopIfBlocked();
     $this->executeCommands($input, $output, $I, $settings['bootstrap']);
     $dispatcher->dispatch(Events::TEST_AFTER, new TestEvent($this->test));
     $dispatcher->dispatch(Events::SUITE_AFTER, new SuiteEvent($this->suite));
     $output->writeln("<info>Bye-bye!</info>");
 }
開發者ID:hitechdk,項目名稱:Codeception,代碼行數:42,代碼來源:Console.php

示例4: __construct

 public function __construct($options)
 {
     $this->prepareOptions($options);
     $this->output = new Output($options);
     $this->messageFactory = new MessageFactory($this->output);
     if ($this->debug) {
         Debug::setOutput($this->output);
     }
     $this->detectWidth();
     if ($this->options['ansi'] && !$this->isWin()) {
         $this->chars['success'] = '✔';
         $this->chars['fail'] = '✖';
     }
     foreach (['html', 'xml', 'tap', 'json'] as $report) {
         if (!$this->options[$report]) {
             continue;
         }
         $path = $this->absolutePath($this->options[$report]);
         $this->reports[] = sprintf("- <bold>%s</bold> report generated in <comment>file://%s</comment>", strtoupper($report), $path);
     }
 }
開發者ID:solutionDrive,項目名稱:Codeception,代碼行數:21,代碼來源:Console.php


注:本文中的Codeception\Util\Debug::setOutput方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。