You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well AssertEqualsIsDiscouragedRule will already pick this up and recommend assertSame call so you'll eventually get to assertCount by following this chain of reported errors 😊
Adding yet another rule would mean that you'd get two different errors for $this->assertEquals(45, count($actual));, each one recommending something different.
Of course tailoring AssertEqualsIsDiscouragedRule for $this->assertEquals(45, count($actual)); and letting it recommend assertCount directly would be useful, so feel free to contribute that.
Activity
ondrejmirtes commentedon Sep 15, 2025
Well AssertEqualsIsDiscouragedRule will already pick this up and recommend
assertSamecall so you'll eventually get toassertCountby following this chain of reported errors 😊Adding yet another rule would mean that you'd get two different errors for
$this->assertEquals(45, count($actual));, each one recommending something different.Of course tailoring AssertEqualsIsDiscouragedRule for
$this->assertEquals(45, count($actual));and letting it recommendassertCountdirectly would be useful, so feel free to contribute that.