Project

General

Profile

Bug #73874

Updated by Christian Kuhn almost 8 years ago

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. aseTestCase::backupGlobalsBlacklist. 

 TYPO3 6.2 is not affected.

Back