[TASK] Reduce GU::makeInstance calls in Unit Tests
Additional potential functionality (DI, XClass resolving, etc.) of GU::makeInstance is usually not a wanted behaviour in unit tests. For creation of system under test `new` should be used. Dependencies, if necessary, should be mocks. This patch reduces the obvious cases, more complicated ones will be tackled with follow ups. Resolves: #103902 Releases: main, 12.4 Change-Id: I07cbe6f10fe11e1239cdd5f0fe7496948eed5a44 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84485 Reviewed-by:Benjamin Franzke <ben@bnf.dev> Tested-by:
Benjamin Franzke <ben@bnf.dev> Tested-by:
core-ci <typo3@b13.com>
Showing
- Build/phpstan/phpstan-baseline.neon 0 additions, 5 deletionsBuild/phpstan/phpstan-baseline.neon
- typo3/sysext/core/Tests/Unit/Authentication/IpLockerTest.php 2 additions, 3 deletionstypo3/sysext/core/Tests/Unit/Authentication/IpLockerTest.php
- typo3/sysext/core/Tests/Unit/Authentication/Mfa/Provider/RecoveryCodesTest.php 1 addition, 2 deletions...ts/Unit/Authentication/Mfa/Provider/RecoveryCodesTest.php
- typo3/sysext/core/Tests/Unit/Authentication/Mfa/Provider/TotpTest.php 12 additions, 10 deletions.../core/Tests/Unit/Authentication/Mfa/Provider/TotpTest.php
- typo3/sysext/core/Tests/Unit/Configuration/CKEditor5MigratorTest.php 1 addition, 6 deletions...t/core/Tests/Unit/Configuration/CKEditor5MigratorTest.php
- typo3/sysext/core/Tests/Unit/Configuration/SiteConfigurationTest.php 3 additions, 3 deletions...t/core/Tests/Unit/Configuration/SiteConfigurationTest.php
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/AbstractRestrictionTestCase.php 1 addition, 2 deletions...atabase/Query/Restriction/AbstractRestrictionTestCase.php
- typo3/sysext/core/Tests/Unit/Imaging/IconProvider/BitmapIconProviderTest.php 1 addition, 2 deletions...ests/Unit/Imaging/IconProvider/BitmapIconProviderTest.php
- typo3/sysext/core/Tests/Unit/Imaging/IconProvider/SvgIconProviderTest.php 1 addition, 1 deletion...e/Tests/Unit/Imaging/IconProvider/SvgIconProviderTest.php
- typo3/sysext/core/Tests/Unit/Imaging/IconProvider/SvgSpriteIconProviderTest.php 1 addition, 1 deletion...s/Unit/Imaging/IconProvider/SvgSpriteIconProviderTest.php
- typo3/sysext/core/Tests/Unit/Log/Processor/AbstractProcessorTest.php 1 addition, 2 deletions...t/core/Tests/Unit/Log/Processor/AbstractProcessorTest.php
- typo3/sysext/core/Tests/Unit/Log/Writer/FileWriterTest.php 6 additions, 20 deletionstypo3/sysext/core/Tests/Unit/Log/Writer/FileWriterTest.php
- typo3/sysext/core/Tests/Unit/Messaging/FlashMessageRendererResolverTest.php 1 addition, 3 deletions...Tests/Unit/Messaging/FlashMessageRendererResolverTest.php
- typo3/sysext/core/Tests/Unit/Messaging/Renderer/BootstrapRendererTest.php 6 additions, 8 deletions...e/Tests/Unit/Messaging/Renderer/BootstrapRendererTest.php
- typo3/sysext/core/Tests/Unit/Messaging/Renderer/ListRendererTest.php 6 additions, 9 deletions...t/core/Tests/Unit/Messaging/Renderer/ListRendererTest.php
- typo3/sysext/core/Tests/Unit/Messaging/Renderer/PlaintextRendererTest.php 6 additions, 9 deletions...e/Tests/Unit/Messaging/Renderer/PlaintextRendererTest.php
- typo3/sysext/core/Tests/Unit/MetaTag/GenericMetaTagManagerTest.php 3 additions, 1 deletion...ext/core/Tests/Unit/MetaTag/GenericMetaTagManagerTest.php
- typo3/sysext/core/Tests/Unit/Page/AssetCollectorTest.php 1 addition, 2 deletionstypo3/sysext/core/Tests/Unit/Page/AssetCollectorTest.php
- typo3/sysext/core/Tests/Unit/Page/AssetRendererTest.php 20 additions, 22 deletionstypo3/sysext/core/Tests/Unit/Page/AssetRendererTest.php
- typo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php 4 additions, 4 deletionstypo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php
Please register or sign in to comment