Prefer assertSame for exact value and type comparison; use assertEquals only when type coercion is intentionally part of the contract: ~~~php self::assertSame(3, $result); self::assertSame('3', $formatted); ~~~ Also choose focused assertions such as assertCount or assertMatchesRegularExpression where they express behavior clearly.
Installs into .claude/skills of the current project.
Are you the author of Php Testing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-php-testing-ab4a2707)
Prefer assertSame for exact value and type comparison; use assertEquals only when type coercion is intentionally part of the contract:
~~~php
self::assertSame(3, $result);
self::assertSame('3', $formatted);
~~~
Also choose focused assertions such as assertCount or assertMatchesRegularExpression where they express behavior clearly.