[TYPO3-dev] PHPUnit_Util_GlobalState::restoreGlobals destroys DB-connection (Typo3 4.5.37)

Christian Stüdemann typo3.v01 at christian-stuedemann.de
Fri Dec 5 14:43:47 CET 2014


Am 04.12.2014 um 23:37 schrieb Christian Stüdemann:
> 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

The Forum http://forum.typo3.org/index.php/t/140961/ recommends to do 
solution e). I tried so and it was successful. Solved!



More information about the TYPO3-dev mailing list