Actions
Bug #63943
closedPHPUnit-Tests fail on Windows
Start date:
2014-12-16
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
Executing the PHPUnit-Tests on Windows is not possible currently:
Fatal error: Cannot redeclare class TYPO3\CMS\Extbase\Tests\Unit\DomainObject\DomainObject_5490aef9162dd in D:\typo3\master\typo3\sysext\extbase\Tests\Unit\DomainObject\AbstractEntityTest.php(89) : eval()'d code on line 4
This is due to
$domainObjectName = uniqid('DomainObject_'); $domainObjectNameWithNS = __NAMESPACE__ . '\\' . $domainObjectName; eval('namespace ' . __NAMESPACE__ . '; class ' . $domainObjectName . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' { public $foo; public $bar; }'); $secondDomainObjectName = uniqid('DomainObject_'); $secondDomainObjectNameWithNS = __NAMESPACE__ . '\\' . $secondDomainObjectName; eval('namespace ' . __NAMESPACE__ . '; class ' . $secondDomainObjectName . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' { public $foo; public $bar; }');
On windows the calls
$domainObjectName = uniqid('DomainObject_'); $secondDomainObjectName = uniqid('DomainObject_');
return the same id, which is related to #59701, #58602 and #59055.
Using
$domainObjectName = 'DomainObject_' . md5(uniqid(microtime(), true));
solves the issue.
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35528
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35529
Updated by Stephan Großberndt about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 84f2d555fb91d3e3123e778c5f38a547b6a386b2.
Actions