Issue Bug Closed

#64055PHPUnit-Tests fail on Windows (2)

Stephan Großberndt 12/29/14, 20:15 updated 10/02/18, 11:48

Description

Another test failing on windows (similar to #63943)

Fatal error: Cannot redeclare class TYPO3\CMS\Backend\Tests\Unit\Utility\BackendUtility54a1a650122b7 in D:\typo3\master\typo3\sysext\backend\Tests\Unit\Utility\BackendUtilityTest.php(242) : eval()'d code on line 1

This is due to

    public function getProcessedValueForGroupWithMultipleAllowedTables() {
        // Disable getRecordWSOL and getRecordTitle dependency by returning stable results
        /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Backend\Utility\BackendUtility $subject */
        $className = uniqid('BackendUtility');
        $subject = __NAMESPACE__ . '\\' . $className;

which has to be replaced with

$className = 'BackendUtility' . md5(uniqid(mt_rand(), TRUE));

Reviews 3