Project

General

Profile

Actions

Bug #73874

closed

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

Added by Oliver Klee about 8 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-03-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions

Also available in: Atom PDF