当前位置: 首页>>代码示例>>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;未经允许,请勿转载。