Replies: 1 comment 2 replies
-
|
This is a consistency rule, it makes sure your team is using one style all over. https://mago.carthage.software/tools/linter/rules/consistency#assertion-style The You can configure it as follows: [linter.rules]
assertion-style = { style = "self" } # or "this" or "static" |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://docs.phpunit.de/en/12.3/assertions.html#assertions
The docs say you should write
$this-> assertNull. But since these are static methods, we should writeself::assertNull.The test is already extending from the TestCase which extends from \PHPUnit\Framework\Assert.
Why does Mago lint suggest me to write
static::assertNullinstead?Why is
staticbetter thanselfin this case?Beta Was this translation helpful? Give feedback.
All reactions