Issue Bug Rejected

#73874Make PHPunit usable with typo3 v7.6 ex. Add TYPO3_CONF_VARS to BaseTestCase::backupGlobalsBlacklist

Oliver Klee 03/02/16, 17:12 updated 10/19/16, 11:42

Description

Currently, when running the Domain Model tests generated by the Extension Builder extension using the BE module of the phpunit extension (master) in TYPO3 7LTS, I get this error:

Error in test case getTitleReturnsInitialValueForString
File: phar://typo3conf/ext/phpunit/Resources/Private/Libraries/phpunit-library.phar/vendor/sebastian/global-state/src/Snapshot.php
Line: 313
Serialization of ‘Closure’ is not allowed

This problem occurs because the backup of globals is enabled in the unit test base class, and $GLOBALS[‘TYPO3_CONF_VARS’] contains some closures, e.g., in $GLOBALS[‘SC_OPTIONS’][‘GLOBAL’][‘cliKeys’][‘extbase’]0.

So we should add ‘TYPO3_CONF_VARS’ to BaseTestCase::backupGlobalsBlacklist.

TYPO3 6.2 is not affected.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.