1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 22:28:46 +01:00

[task/phpunit-xml] Manually blacklisting a few PHPUnit classes from backups.

The blacklisting of these static variables is necessary because code coverage
will otherwise consume too much memory. The problem did not exist in earlier
PHPUnit versions because all classes beginning with PHPUnit are automatically
blacklisted, and code coverage as well as a few other internal classes were
still internal parts of PHPunit. These were now moved to PHP_ namespace,
causing the problem with backupStaticAttributes.

PHPBB3-9967
This commit is contained in:
Nils Adermann 2011-01-07 01:07:21 +01:00
parent b4f95deefc
commit b48b909773
2 changed files with 30 additions and 0 deletions

View File

@ -13,6 +13,21 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
protected $test_case_helpers;
public function __construct($name = NULL, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->backupStaticAttributesBlacklist += array(
'PHP_CodeCoverage' => array('instance'),
'PHP_CodeCoverage_Filter' => array('instance'),
'PHP_CodeCoverage_Util' => array('ignoredLines', 'templateMethods'),
'PHP_Timer' => array('startTimes',),
'PHP_Token_Stream' => array('customTokens'),
'PHP_Token_Stream_CachingFactory' => array('cache'),
'phpbb_database_test_case' => array('already_connected'),
);
}
public function get_test_case_helpers()
{
if (!$this->test_case_helpers)

View File

@ -11,6 +11,21 @@ class phpbb_test_case extends PHPUnit_Framework_TestCase
{
protected $test_case_helpers;
public function __construct($name = NULL, array $data = array(), $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->backupStaticAttributesBlacklist += array(
'PHP_CodeCoverage' => array('instance'),
'PHP_CodeCoverage_Filter' => array('instance'),
'PHP_CodeCoverage_Util' => array('ignoredLines', 'templateMethods'),
'PHP_Timer' => array('startTimes',),
'PHP_Token_Stream' => array('customTokens'),
'PHP_Token_Stream_CachingFactory' => array('cache'),
'phpbb_database_test_case' => array('already_connected'),
);
}
public function get_test_case_helpers()
{
if (!$this->test_case_helpers)