Actions
Bug #23435
closedUnit Tests: $GLOBALS['TYPO3_DB']->link get lost during backup/ restore of global variables
Start date:
2010-08-23
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Problem:
When using phpunit's feature of backing up and restoring global variables, the sql resource link in $GLOBALS['TYPO3_DB']->link is lost, because PHP serializing does not support resource-types.[1]
If this feature is used in one testcase, the following testcases that rely on a database link will fail or throw errors, if all tests are executed at once.
Solution:
Add TYPO3_DB to the blacklist for the globals backup in the core tests where this phpunit feature is used.
Note:
If the backupGlobals feature is used and the TYPO3_DB is mocked, then the backup/ restore mus be handled in the testcase. This is currently not the case within the core unit tests.
[1]http://php.net/serialize
(issue imported from #M15539)
Files
Actions