Why this matters
Catches subtle type issues and reduces repetitive tests.
Prefer data providers for parameterized cases and use assertSame/assertNotSame for type-strict checks; avoid loose equals.
Catches subtle type issues and reduces repetitive tests.
Side-by-side examples engineers can pattern-match during review.
public function testAdd(){
$this->assertEquals("3", add(1,2)); // string vs int
}/ @dataProvider sums */
public function testAdd($a,$b,$sum){
$this->assertSame($sum, add($a,$b));
}
public function sums(){ return [[1,2,3],[0,0,0]]; }$this->assertSame(3, add(1,2));$this->assertEquals("3", add(1,2));From the same buckets as this rule.
Reject PRs adding real PAN/CVV in fixtures, seeds, or mocks. Only use Luhn-valid test PANs from the gateway or opaque tokens (e.g., tok_) and never include CVV. Add a check to fail if a PAN regex is matched. (PCI DSS data minimization)