Skip to content
Snippets Groups Projects
Commit 5d53d7cf authored by Ayke Halder's avatar Ayke Halder Committed by Stefan Bürk
Browse files

[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: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
parent 62d9574f
Branches
Tags
No related merge requests found
Showing
with 18 additions and 16 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment