本文整理汇总了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.');
}
}
示例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
*/