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


PHP PHPUnit_Util_Filesystem::collectEnd方法代码示例

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


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

示例1: __construct

 /**
  * @param string $type      The type of concrete Log subclass to use.
  *                          Currently, valid values are 'console',
  *                          'syslog', 'sql', 'file', and 'mcal'.
  * @param string $name      The name of the actually log file, table, or
  *                          other specific store to use. Defaults to an
  *                          empty string, with which the subclass will
  *                          attempt to do something intelligent.
  * @param string $ident     The identity reported to the log system.
  * @param array  $conf      A hash containing any additional configuration
  *                          information that a subclass might need.
  * @param int $maxLevel     Maximum priority level at which to log.
  */
 public function __construct($type, $name = '', $ident = '', $conf = array(), $maxLevel = PEAR_LOG_DEBUG)
 {
     if (PHPUnit_Util_Filesystem::fileExistsInIncludePath('Log.php')) {
         PHPUnit_Util_Filesystem::collectStart();
         require_once 'Log.php';
         $this->log = Log::factory($type, $name, $ident, $conf, $maxLevel);
         foreach (PHPUnit_Util_Filesystem::collectEnd() as $blacklistedFile) {
             PHPUnit_Util_Filter::addFileToFilter($blacklistedFile, 'PHPUNIT');
         }
     } else {
         throw new RuntimeException('Log is not available.');
     }
 }
开发者ID:nblackman,项目名称:pimcore,代码行数:26,代码来源:PEAR.php

示例2: __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

示例3: updateTicket

 protected function updateTicket($ticketId, $newStatus, $message, $resolution)
 {
     if (PHPUnit_Util_Filesystem::fileExistsInIncludePath('XML/RPC2/Client.php')) {
         PHPUnit_Util_Filesystem::collectStart();
         require_once 'XML/RPC2/Client.php';
         $ticket = XML_RPC2_Client::create($this->scheme . '://' . $this->username . ':' . $this->password . '@' . $this->hostpath, array('prefix' => 'ticket.'));
         try {
             $ticketInfo = $ticket->get($ticketId);
         } catch (XML_RPC2_FaultException $e) {
             throw new PHPUnit_Framework_Exception(sprintf("Trac fetch failure: %d: %s\n", $e->getFaultCode(), $e->getFaultString()));
         }
         try {
             printf("Updating Trac ticket #%d, status: %s\n", $ticketId, $newStatus);
             $ticket->update($ticketId, $message, array('status' => $newStatus, 'resolution' => $resolution));
         } catch (XML_RPC2_FaultException $e) {
             throw new PHPUnit_Framework_Exception(sprintf("Trac update failure: %d: %s\n", $e->getFaultCode(), $e->getFaultString()));
         }
         foreach (PHPUnit_Util_Filesystem::collectEnd() as $blacklistedFile) {
             PHPUnit_Util_Filter::addFileToFilter($blacklistedFile, 'PHPUNIT');
         }
     } else {
         throw new PHPUnit_Framework_Exception('XML_RPC2 is not available.');
     }
 }
开发者ID:kdambekalns,项目名称:framework-benchs,代码行数:24,代码来源:Trac.php

示例4: error_reporting

 *
 * @category   Testing
 * @package    PHPUnit
 * @author     Sebastian Bergmann <sb@sebastian-bergmann.de>
 * @copyright  2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
 * @version    SVN: $Id: PhptTestCase.php 4528 2009-01-21 14:16:59Z sb $
 * @link       http://www.phpunit.de/
 * @since      File available since Release 3.1.4
 */
if (PHPUnit_Util_Filesystem::fileExistsInIncludePath('PEAR/RunTest.php')) {
    $currentErrorReporting = error_reporting(E_ERROR | E_WARNING | E_PARSE);
    PHPUnit_Util_Filesystem::collectStart();
    require_once 'PEAR/RunTest.php';
    error_reporting($currentErrorReporting);
    foreach (PHPUnit_Util_Filesystem::collectEnd() as $blacklistedFile) {
        PHPUnit_Util_Filter::addFileToFilter($blacklistedFile, 'PHPUNIT');
    }
}
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Extensions/PhptTestCase/Logger.php';
require_once 'PHPUnit/Util/Filter.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
 * Wrapper to run .phpt test cases.
 *
 * @category   Testing
 * @package    PHPUnit
 * @author     Sebastian Bergmann <sb@sebastian-bergmann.de>
 * @copyright  2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
开发者ID:kytvi2p,项目名称:ZettaFramework,代码行数:31,代码来源:PhptTestCase.php


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