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


PHP PHPUnit_TextUI_ResultPrinter::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     ob_start();
     // start output buffering, so we can send the output to the browser in chunks
     $this->autoFlush = true;
     parent::__construct($out, $verbose, false, $debug);
 }
开发者ID:kshyana,项目名称:PHP-TestKit,代码行数:7,代码来源:TestKit_Printer.php

示例2: __construct

 public function __construct($out = null, $verbose = false, $colors = false, $debug = false)
 {
     parent::__construct($out, $verbose, $colors, $debug);
     $this->colors = false;
     $this->printsHTML = true;
     $this->debug = self::$shouldDebug;
 }
开发者ID:timetoogo,项目名称:pinq,代码行数:7,代码来源:TestRunner.php

示例3: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($out, $verbose, $colors, $debug, $numberOfColumns)
 {
     parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns);
     if ($html_output_directory = getenv('BROWSERTEST_OUTPUT_DIRECTORY')) {
         // Initialize html output debugging.
         $html_output_directory = rtrim($html_output_directory, '/');
         // Check if directory exists.
         if (!is_dir($html_output_directory) || !is_writable($html_output_directory)) {
             $this->writeWithColor('bg-red, fg-black', "HTML output directory {$html_output_directory} is not a writable directory.");
         } else {
             // Convert to a canonicalized absolute pathname just in case the current
             // working directory is changed.
             $html_output_directory = realpath($html_output_directory);
             $this->browserOutputFile = tempnam($html_output_directory, 'browser_output_');
             if ($this->browserOutputFile) {
                 touch($this->browserOutputFile);
             } else {
                 $this->writeWithColor('bg-red, fg-black', "Unable to create a temporary file in {$html_output_directory}.");
             }
         }
     }
     if ($this->browserOutputFile) {
         putenv('BROWSERTEST_OUTPUT_FILE=' . $this->browserOutputFile);
     } else {
         // Remove any environment variable.
         putenv('BROWSERTEST_OUTPUT_FILE');
     }
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:31,代码来源:HtmlOutputPrinter.php

示例4: __construct

 /**
  * Constructor
  *
  * @param null $out
  * @param bool $verbose
  * @param bool $colors
  * @param bool $debug
  */
 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     parent::__construct($out, $verbose, $colors, $debug);
     // this class being used as a printerClass doesn't receive any configuration from PHPUnit.
     // that's we need this hack...
     if (isset($_SERVER['argv']) && in_array('--colors', $_SERVER['argv'])) {
         $this->colors = true;
     }
 }
开发者ID:aoemedia,项目名称:menta,代码行数:17,代码来源:VerboseResultPrinter.php

示例5: __construct

 public function __construct($_blDBResetPerTest = true, $_blDBResetPerSuit = true, $iDBChangeMode = MAINTENANCE_SINGLEROWS, $_iDBChangeOutput = MAINTENANCE_MODE_ONLYRESET, $blVerbose = false)
 {
     parent::__construct(null, (bool) $blVerbose);
     $this->_iDBChangeMode = $iDBChangeMode;
     $this->_iDBChangeOutput = $_iDBChangeOutput;
     $this->_blDBResetPerTest = $_blDBResetPerTest;
     $this->_blDBResetPerSuit = $_blDBResetPerSuit;
     $this->_oDBMaintenance = new dbMaintenance();
 }
开发者ID:OXIDprojects,项目名称:debugax,代码行数:9,代码来源:oxPrinter.php

示例6: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80)
 {
     parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns);
     if ($numberOfColumns === 'max') {
         $console = new Console();
         $numberOfColumns = $console->getNumberOfColumns();
     }
     $this->maxNumberOfColumns = $numberOfColumns;
     $this->maxClassNameLength = intval($numberOfColumns * 0.6);
 }
开发者ID:zf2timo,项目名称:PHPUnitPrettyResultPrinter,代码行数:13,代码来源:Printer.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param  mixed   $out
  * @param  boolean $verbose
  * @param  boolean $colors
  * @param  boolean $debug
  */
 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     // Start capturing output
     ob_start();
     $argv = $_SERVER['argv'];
     $colors = in_array('--colors', $argv) || $colors;
     $verbose = in_array('--verbose', $argv) || in_array('-v', $argv) || $verbose;
     $debug = in_array('--debug', $argv) || $debug;
     parent::__construct($out, $verbose, $colors, $debug);
 }
开发者ID:joskfg,项目名称:guard-phpunit2,代码行数:18,代码来源:ResultPrinter.php

示例8: __construct

 public function __construct($backtrace, $colors = false)
 {
     parent::__construct(null, false, $colors);
     $this->backtrace = '';
     foreach ($backtrace as $trace) {
         if (isset($trace['file']) && isset($trace['line'])) {
             $this->backtrace .= $trace['file'] . ':' . $trace['line'] . "\n";
         }
     }
 }
开发者ID:skerbis,项目名称:redaxo,代码行数:10,代码来源:tests_result_printer.php

示例9: __construct

 public function __construct()
 {
     // ARRGH - PHPUnit does not give us commandline arguments or xml config, so let's hack hard!
     if (defined('DEBUG_BACKTRACE_PROVIDE_OBJECT')) {
         $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT);
         if (isset($backtrace[2]['object']) and $backtrace[2]['object'] instanceof PHPUnit_TextUI_Command) {
             list($verbose, $colors, $debug) = Hacky_TextUI_Command_reader::get_settings_hackery($backtrace[2]['object']);
             parent::__construct(null, $verbose, $colors, $debug);
             return;
         }
     }
     // Fallback if something goes wrong.
     parent::__construct(null, false, self::COLOR_DEFAULT, false);
 }
开发者ID:janeklb,项目名称:moodle,代码行数:14,代码来源:hint_resultprinter.php

示例10: __construct

 public function __construct($backtrace, $colors = false)
 {
     $out = null;
     if (php_sapi_name() == 'cli') {
         // prevent headers already sent error when started from CLI
         $out = 'php://stderr';
     }
     parent::__construct($out, false, $colors);
     $this->backtrace = '';
     foreach ($backtrace as $trace) {
         if (isset($trace['file']) && isset($trace['line'])) {
             $this->backtrace .= $trace['file'] . ':' . $trace['line'] . "\n";
         }
     }
 }
开发者ID:staabm,项目名称:redaxo,代码行数:15,代码来源:tests_result_printer.php

示例11: __construct

 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     parent::__construct($out, $verbose, $colors);
     if (!empty($_SERVER['COLUMNS'])) {
         $this->maxColumns = $_SERVER['COLUMNS'];
     } else {
         if (function_exists('ncurses_getmaxyx')) {
             ncurses_getmaxyx(STDSCR, $height, $this->maxColumns);
         } else {
             // Try to get it on *nix like systems
             exec('resize 2>/dev/null', $output, $ret);
             if ($ret === 0 && preg_match('/COLUMNS=([0-9]+)/', $output[0], $m)) {
                 $this->maxColumns = $m[1];
             }
         }
     }
 }
开发者ID:rafeca,项目名称:Spec-PHP,代码行数:17,代码来源:ResultPrinter.php

示例12: __construct

 /**
  * {@inheritDoc}
  */
 public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80)
 {
     parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns);
     if ($this->debug) {
         $minLevelOrList = LogLevel::INFO;
     } elseif ($this->verbose) {
         $minLevelOrList = LogLevel::NOTICE;
     } else {
         $minLevelOrList = array(LogLevel::NOTICE, LogLevel::ERROR);
     }
     $console = new \MonologConsoleLogger('ResultPrinter');
     $console->setAcceptedLevels($minLevelOrList);
     $handlers = $console->getHandlers();
     foreach ($handlers as &$handler) {
         // attachs processors only to console handler
         if ($handler instanceof \Monolog\Handler\FilterHandler) {
             // new results presentation when color is supported or not
             $handler->pushProcessor(array($this, 'messageProcessor'));
         }
     }
     $this->setLogger($console);
 }
开发者ID:ElectroLutz,项目名称:monolog-growlhandler,代码行数:25,代码来源:ResultPrinter.php

示例13: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     $term = empty($_SERVER['TERM']) ? 'unknown' : $_SERVER['TERM'];
     $this->fab = \Fab\Factory::getFab($term);
     parent::__construct($out, $verbose, true, $debug);
 }
开发者ID:whatthejeff,项目名称:fab-phpunit-resultprinter,代码行数:9,代码来源:ResultPrinter.php

示例14: __construct

 /**
  * Constructor.
  *
  * @param  mixed                       $out
  * @param  boolean                     $verbose
  * @param  boolean                     $colors
  * @param  boolean                     $debug
  * @throws PHPUnit_Framework_Exception
  * @since  Method available since Release 3.0.0
  */
 public function __construct($out = null, $verbose = false, $colors = false, $debug = false, $seed = null)
 {
     parent::__construct($out, $verbose, $colors, $debug);
     $this->seed = $seed;
 }
开发者ID:hasumedic,项目名称:phpunit-randomizer,代码行数:15,代码来源:ResultPrinter.php

示例15: __construct

 public function __construct($out = NULL, $colors = FALSE)
 {
     parent::__construct($out, false, $colors);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:4,代码来源:VerboseResultPrinter.php


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