[BUGFIX] Mock locked records for DataProviderTest 75/27975/4
authorHelmut Hummel <helmut.hummel@typo3.org>
Sun, 2 Mar 2014 14:53:38 +0000 (15:53 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Sun, 2 Mar 2014 18:12:08 +0000 (19:12 +0100)
The DataProviderTest calls BackendUtility::isRecordLocked
statically. We cannot mock that call, but we can
"mock" a locked record so that BackendUtility::isRecordLocked
does not query the database.

Resolves: #56472
Releases: 6.2
Change-Id: I268a7a900a0f2dcbf248f6a4d856354c7b1cdcd6
Reviewed-on: https://review.typo3.org/27975
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php

index 4520791..db3512a 100644 (file)
@@ -39,6 +39,7 @@ class DataProviderTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function setUp() {
                $GLOBALS['TYPO3_CONF_VARS']['BE']['pageTree']['preloadLimit'] = 0;
                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'] = array();
+               $GLOBALS['LOCKED_RECORDS'] = array();
                $this->fixture = new \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider();
        }