[BUGFIX] Set uid of BE_USER mock in functional tests 42/26642/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Sat, 4 Jan 2014 15:36:36 +0000 (16:36 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sat, 4 Jan 2014 15:39:51 +0000 (16:39 +0100)
Datahandler functional tests lack proper initialization of the
BE_USER mock used.

Set a 'uid' for the mock in order to get tests working again.

Resolves: #54741
Releases: 6.2
Change-Id: I20cccf8d3622b2c63d6b7c9f07c0e2d238bea7b9
Reviewed-on: https://review.typo3.org/26642
Reviewed-by: Oliver Hader
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/DataHandlerTest.php

index 9cb8fb5..30b1abe 100644 (file)
@@ -39,6 +39,7 @@ class DataHandlerTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
                /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
                $backendUser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
                $backendUser->user['admin'] = 1;
+               $backendUser->user['uid'] = 1;
                // By default make tests on live workspace
                $backendUser->workspace = 0;
                $GLOBALS['BE_USER'] = $backendUser;
index f5a09d8..b927c2b 100644 (file)
@@ -39,6 +39,7 @@ class DataHandlerTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
                /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
                $backendUser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
                $backendUser->user['admin'] = 1;
+               $backendUser->user['uid'] = 1;
                $GLOBALS['BE_USER'] = $backendUser;
                \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();