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


PHP PHPUnit_Util_Filesystem::collectEndAndAddToBlacklist方法代碼示例

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


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

示例1: 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()));
         }
         PHPUnit_Util_Filesystem::collectEndAndAddToBlacklist();
     } else {
         throw new PHPUnit_Framework_Exception('XML_RPC2 is not available.');
     }
 }
開發者ID:regnou,項目名稱:AXEL-MOWER,代碼行數:22,代碼來源:Trac.php

示例2: error_reporting

 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @package    PHPUnit
 * @subpackage Extensions_PhptTestCase
 * @author     Sebastian Bergmann <sebastian@phpunit.de>
 * @copyright  2002-2010 Sebastian Bergmann <sebastian@phpunit.de>
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
 * @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);
    PHPUnit_Util_Filesystem::collectEndAndAddToBlacklist();
}
require_once 'PHP/CodeCoverage.php';
require_once 'PHP/Timer.php';
/**
 * Wrapper to run .phpt test cases.
 *
 * @package    PHPUnit
 * @subpackage Extensions_PhptTestCase
 * @author     Sebastian Bergmann <sebastian@phpunit.de>
 * @copyright  2002-2010 Sebastian Bergmann <sebastian@phpunit.de>
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
 * @version    Release: @package_version@
 * @link       http://www.phpunit.de/
 * @since      Class available since Release 3.1.4
 */
開發者ID:KnpLabs,項目名稱:phpunit-easyinstall,代碼行數:31,代碼來源:PhptTestCase.php


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