Project

General

Profile

Actions

Bug #23435

closed

Unit Tests: $GLOBALS['TYPO3_DB']->link get lost during backup/ restore of global variables

Added by Helmut Hummel over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
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

15539.diff (2.09 KB) 15539.diff Administrator Admin, 2010-08-23 23:47
Actions #1

Updated by Xavier Perseguers over 14 years ago

Committed to trunk (rev. 8670)

Actions #2

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF