[TASK] Use special PHPUnit ruleset for PHPStan
This enables the already available `phpstan-phpunit` rules: * PHPStan\Rules\PHPUnit\AssertSameBooleanExpectedRule * PHPStan\Rules\PHPUnit\AssertSameNullExpectedRule * PHPStan\Rules\PHPUnit\AssertSameWithCountRule * PHPStan\Rules\PHPUnit\MockMethodCallRule * PHPStan\Rules\PHPUnit\ShouldCallParentMethodsRule `ShouldCallParentMethodsRule` is of great interest: It checks for missing calls to `parent::setUp` and `parent::tearDown`. `AssertSameWithCountRule` replaces `assertSame($expectedCount, count($variable))` with `assertCount($expectedCount, $variable)`. Resolves: #103880 Related: #103929 Releases: main Change-Id: I43a69d0dcf342cc65d34eb03f2d9800b1e70e8a2 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84351 Reviewed-by:Oliver Klee <typo3-coding@oliverklee.de> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Oliver Klee <typo3-coding@oliverklee.de>
Showing
- Build/phpstan/phpstan.neon 1 addition, 0 deletionsBuild/phpstan/phpstan.neon
- typo3/sysext/core/Tests/Functional/Cache/Backend/ApcuBackendTest.php 1 addition, 1 deletion...t/core/Tests/Functional/Cache/Backend/ApcuBackendTest.php
- typo3/sysext/core/Tests/Functional/Database/Query/QueryBuilder/PositionPlaceholderPreparedStatementTest.php 4 additions, 4 deletions...QueryBuilder/PositionPlaceholderPreparedStatementTest.php
- typo3/sysext/core/Tests/Functional/Security/ContentSecurityPolicy/ModelServiceTest.php 1 addition, 0 deletions...ional/Security/ContentSecurityPolicy/ModelServiceTest.php
- typo3/sysext/core/Tests/Unit/Utility/String/StringFragmentCollectionTest.php 1 addition, 1 deletion...ests/Unit/Utility/String/StringFragmentCollectionTest.php
- typo3/sysext/extbase/Tests/Functional/Persistence/CountTest.php 1 addition, 1 deletion...sysext/extbase/Tests/Functional/Persistence/CountTest.php
- typo3/sysext/extbase/Tests/Functional/Persistence/WorkspaceTest.php 1 addition, 1 deletion...xt/extbase/Tests/Functional/Persistence/WorkspaceTest.php
- typo3/sysext/extensionmanager/Tests/Unit/Domain/Model/ExtensionTest.php 1 addition, 1 deletion...xtensionmanager/Tests/Unit/Domain/Model/ExtensionTest.php
- typo3/sysext/form/Tests/Functional/Domain/Model/Renderable/AbstractRenderableTest.php 2 additions, 2 deletions...tional/Domain/Model/Renderable/AbstractRenderableTest.php
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugLinkGeneratorTest.php 1 addition, 1 deletion...d/Tests/Functional/SiteHandling/SlugLinkGeneratorTest.php
- typo3/sysext/redirects/Tests/Functional/EventListener/AddPageTypeZeroSourceTest.php 3 additions, 3 deletions...ts/Functional/EventListener/AddPageTypeZeroSourceTest.php
- typo3/sysext/redirects/Tests/Unit/RedirectUpdate/RedirectSourceCollectionTest.php 1 addition, 1 deletion...ests/Unit/RedirectUpdate/RedirectSourceCollectionTest.php
Please register or sign in to comment