[BUGFIX] Remove getRecordTitle() runtime cache
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Tests / Unit / Utility / BackendUtilityTest.php
index 460d3c7..360169c 100644 (file)
@@ -1034,28 +1034,6 @@ class BackendUtilityTest extends UnitTestCase
         $this->assertSame($expected, $subject->_call('replaceL10nModeFields', $table, $row));
     }
 
-    /**
-     * @test
-     */
-    public function getRecordTitleHavingLabelUserFuncCachesValue()
-    {
-        $table = 'tx_mytable';
-        $row = ['uid' => 1];
-
-        $mock = $this->getMock('stdClass', ['labelUserFunc']);
-        $mock->expects($this->once())->method('labelUserFunc')->willReturn('Test');
-
-        // Use wrapping closure for GeneralUtility::callUserFunction()
-        $GLOBALS['TCA'][$table]['ctrl']['label_userFunc'] = function (&$parameters) use ($mock) {
-            $parameters['title'] = $mock->labelUserFunc();
-        };
-
-        $this->assertEquals('Test', BackendUtility::getRecordTitle($table, $row));
-
-        // Call a second time to make sure labelUserFunc is not called again ($this->once())
-        $this->assertEquals('Test', BackendUtility::getRecordTitle($table, $row));
-    }
-
     /**
      * @test
      */