[TYPO3-dev] PHPUnit_Util_GlobalState::restoreGlobals destroys DB-connection (Typo3 4.5.37)
Christian Stüdemann
typo3.v01 at christian-stuedemann.de
Thu Dec 4 23:37:32 CET 2014
Dear all,
running a Selenium test with runTestInSeparateProcess=NULL,
inIsolation=NULL, backupGlobals=NULL lets the
PHPUnit_Framework_TestCase::runBare() method call
PHPUnit_Util_GlobalState::backupGlobals before the test run and
PHPUnit_Util_GlobalState::restoreGlobals after the test run in order to
backup and restore all global variables, because they might be changed
by the test run.
The backup and/or restore of the global variables does not work
properly. After "restoreGlobals()" the DB-connection stored in
GLOBALS['TYPO3_DB'] is 0 (i.e. not existing any more), thus all later
DB-calls are crashing.
Seems to be a bug from my point of view. What do you recommend?
a) Report it as a bug? Is it really a bug?
b) Run Selenium with runTestInSeparateProcess=TRUE?
c) Run Selenium with inIsolation=TRUE?
d) Run Selenium with backupGlobals=FALSE?
e) Add 'TYPO3_DB' to the test's backupGlobalsBlacklist?
Thank's a lot for your support and have a nice day,
Christian
More information about the TYPO3-dev
mailing list