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


PHP PHPUnit_Util_Printer::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor
  *
  * Parameter can be set in the phpunit xml configuration file:
  * <code>
  * <listeners>
  * 		<listener class="..." file="...">
  *			<arguments>
  * 				<string>...</string><!-- targetFile -->
  *
  * 				<string>...</string><!-- directory -->
  *
  * 				<array>
  * 					<element key="js/handle.gif">
  * 						<string>###MENTA_ROOTDIR###/PHPUnit/Listener/Resources/Templates/files/handle.gif</string>
  *					</element>
  * 					<element key="js/jquery.beforeafter-1.4.min.js">
  * 						<string>###MENTA_ROOTDIR###/PHPUnit/Listener/Resources/Templates/files/jquery.beforeafter-1.4.min.js</string>
  *					</element>
  *					<!-- ... -->
  * 				</array>
  * 			</arguments>
  * 		</listener>
  * </listeners>
  * </code>
  *
  * @param string $targetFile
  * @param string $templateFile
  * @param array $additionalFiles
  * @throws Exception
  * @author Fabrizio Branca
  */
 public function __construct($targetFile = NULL, $templateFile = NULL, array $additionalFiles = NULL)
 {
     if (!is_null($targetFile)) {
         $this->targetFile = $targetFile;
         $this->targetFile = Menta_Util_Div::replaceWithEnvironmentVariables($this->targetFile);
     }
     $dir = dirname($this->targetFile);
     if (!is_dir($dir)) {
         throw new Exception("Target dir '{$dir}' does not exist");
     }
     // clean target dir
     foreach (glob($dir . "/*") as $file) {
         if (!is_dir($file)) {
             unlink($file);
         }
     }
     if (!is_null($templateFile)) {
         $this->templateFile = $templateFile;
     }
     $this->templateFile = str_replace('###MENTA_ROOTDIR###', MENTA_ROOTDIR, $this->templateFile);
     if (empty($this->templateFile)) {
         throw new Exception('No template file defined');
     }
     if (!is_null($additionalFiles)) {
         $this->additionalFiles = $additionalFiles;
     }
     parent::__construct($this->targetFile);
 }
开发者ID:aoemedia,项目名称:menta,代码行数:60,代码来源:AbstractTemplatablePrinter.php

示例2: __construct

 public function __construct($out = null)
 {
     parent::__construct($out);
     self::$instance = $this;
     $this->setAutoFlush(true);
     $this->fd = fopen("php://fd/3", "w");
 }
开发者ID:vektah,项目名称:phpunit-parallel,代码行数:7,代码来源:SerializePrinter.php

示例3: __construct

 /**
  * @param resource $out
  * @param array    $groups
  * @param array    $excludeGroups
  */
 public function __construct($out = null, array $groups = [], array $excludeGroups = [])
 {
     parent::__construct($out);
     $this->groups = $groups;
     $this->excludeGroups = $excludeGroups;
     $this->prettifier = new PHPUnit_Util_TestDox_NamePrettifier();
     $this->startRun();
 }
开发者ID:thanghexp,项目名称:project,代码行数:13,代码来源:ResultPrinter.php

示例4: __construct

 /**
  * Constructor.
  *
  * @param mixed $out
  * @param bool  $logIncompleteSkipped
  */
 public function __construct($out = null, $logIncompleteSkipped = false)
 {
     $this->document = new DOMDocument('1.0', 'UTF-8');
     $this->document->formatOutput = true;
     $this->root = $this->document->createElement('testsuites');
     $this->document->appendChild($this->root);
     parent::__construct($out);
     $this->logIncompleteSkipped = $logIncompleteSkipped;
 }
开发者ID:ronaldbao,项目名称:phpunit,代码行数:15,代码来源:JUnit.php

示例5: __construct

 /**
  * @param string|resource $out
  */
 public function __construct($out = null)
 {
     $this->document = new DOMDocument('1.0', 'UTF-8');
     $this->document->formatOutput = true;
     $this->root = $this->document->createElement('tests');
     $this->document->appendChild($this->root);
     $this->prettifier = new PHPUnit_Util_TestDox_NamePrettifier();
     parent::__construct($out);
 }
开发者ID:thanghexp,项目名称:project,代码行数:12,代码来源:XML.php

示例6: __construct

 /**
  * Constructor.
  *
  * @param mixed $out
  * @param bool  $reportUselessTests
  */
 public function __construct($out = null, $reportUselessTests = false)
 {
     $this->document = new DOMDocument('1.0', 'UTF-8');
     $this->document->formatOutput = true;
     $this->root = $this->document->createElement('testsuites');
     $this->document->appendChild($this->root);
     parent::__construct($out);
     $this->reportUselessTests = $reportUselessTests;
 }
开发者ID:sebastianbergmann,项目名称:phpunit,代码行数:15,代码来源:JUnit.php

示例7: __construct

 /**
  * {@inheritDoc}
  */
 public function __construct($out = null)
 {
     parent::__construct($out);
     if ($this->isDebug()) {
         $level = LogLevel::DEBUG;
     } elseif ($this->isVerbose()) {
         $level = LogLevel::INFO;
     } else {
         $level = LogLevel::NOTICE;
     }
     $this->setLogger(new \Psr3ConsoleLogger('PHPUnitPrinterLogger', $level));
 }
开发者ID:jclaveau,项目名称:phpunit-LoggerTestListener,代码行数:15,代码来源:bootstrap.printer.php

示例8: __construct

 /**
  * Constructor.
  *
  * @param  mixed   $out
  * @param  boolean $verbose
  * @param  boolean $colors
  * @param  boolean $debug
  * @throws InvalidArgumentException
  * @since  Method available since Release 3.0.0
  */
 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     parent::__construct($out);
     if (is_bool($verbose)) {
         $this->verbose = $verbose;
     } else {
         throw \PHPUnit_Util_InvalidArgumentHelper::factory(2, 'boolean');
     }
     if (is_bool($colors)) {
         $this->colors = $colors;
     } else {
         throw \PHPUnit_Util_InvalidArgumentHelper::factory(3, 'boolean');
     }
     if (is_bool($debug)) {
         $this->debug = $debug;
     } else {
         throw \PHPUnit_Util_InvalidArgumentHelper::factory(4, 'boolean');
     }
 }
开发者ID:noikiy,项目名称:tools,代码行数:29,代码来源:ResultPrinter.php

示例9: __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)
 {
     parent::__construct($out);
     if (is_bool($verbose)) {
         $this->verbose = $verbose;
     } else {
         throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'boolean');
     }
     if (is_bool($colors)) {
         $console = new Console();
         $this->colors = $colors && $console->hasColorSupport();
     } else {
         throw PHPUnit_Util_InvalidArgumentHelper::factory(3, 'boolean');
     }
     if (is_bool($debug)) {
         $this->debug = $debug;
     } else {
         throw PHPUnit_Util_InvalidArgumentHelper::factory(4, 'boolean');
     }
 }
开发者ID:no-chris,项目名称:connector,代码行数:30,代码来源:ResultPrinter.php

示例10: __construct

 /**
  * Constructor.
  *
  * @param  mixed $out
  * @param  array $configuration
  * @throws InvalidArgumentException
  */
 public function __construct($out = NULL, array $configuration = array())
 {
     parent::__construct($out);
     $this->loadClasses($configuration);
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:12,代码来源:PMD.php

示例11: __construct

 /**
  * Constructor.
  *
  * @param  mixed $out
  */
 public function __construct($out = NULL)
 {
     if (PHPUnit_Util_Filesystem::fileExistsInIncludePath('Image/GraphViz.php')) {
         PHPUnit_Util_Filesystem::collectStart();
         require_once 'Image/GraphViz.php';
         $this->graph = new Image_GraphViz(TRUE, array('overlap' => 'scale', 'splines' => 'true', 'sep' => '.1', 'fontsize' => '8'));
         parent::__construct($out);
         foreach (PHPUnit_Util_Filesystem::collectEnd() as $blacklistedFile) {
             PHPUnit_Util_Filter::addFileToFilter($blacklistedFile, 'PHPUNIT');
         }
     } else {
         throw new RuntimeException('Image_GraphViz is not available.');
     }
 }
开发者ID:febryantosulistyo,项目名称:ClassicSocial,代码行数:19,代码来源:GraphViz.php

示例12: __construct

 /**
  * Constructor.
  *
  * @param  mixed   $out
  * @param  boolean $verbose
  * @throws InvalidArgumentException
  * @access public
  * @since  Method available since Release 3.0.0
  */
 public function __construct($out = NULL, $verbose = FALSE)
 {
     parent::__construct($out);
     if (is_bool($verbose)) {
         $this->verbose = $verbose;
     } else {
         throw new InvalidArgumentException();
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:18,代码来源:ResultPrinter.php

示例13: __construct

 /**
  * Constructor.
  *
  * @param  mixed   $out
  * @param  boolean $verbose
  * @param  boolean $colors
  * @param  boolean $debug
  * @throws InvalidArgumentException
  * @since  Method available since Release 3.0.0
  */
 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     parent::__construct($out);
     if (is_bool($colors)) {
         $this->colors = $colors;
     } else {
         throw new InvalidArgumentException();
     }
     if (is_bool($debug)) {
         $this->debug = $debug;
     } else {
         throw new InvalidArgumentException();
     }
     if (is_bool($verbose)) {
         $this->verbose = $verbose;
     } else {
         throw new InvalidArgumentException();
     }
 }
开发者ID:amptools-net,项目名称:midori-php,代码行数:29,代码来源:ResultPrinter.php

示例14: __construct

 /**
  * Constructor.
  *
  * @param  mixed $out
  * @access public
  */
 public function __construct($out = NULL)
 {
     $this->graph = new Image_GraphViz(TRUE, array('overlap' => 'scale', 'splines' => 'true', 'sep' => '.1', 'fontsize' => '8'));
     parent::__construct($out);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:11,代码来源:GraphViz.php

示例15: __construct

 public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE)
 {
     parent::__construct($out);
 }
开发者ID:swk,项目名称:bluebox,代码行数:4,代码来源:Text_Printer.php


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