diff --git a/Tests/EmailValidator/Validation/RFCValidationTest.php b/Tests/EmailValidator/Validation/RFCValidationTest.php index 4c33da4..190ae2b 100644 --- a/Tests/EmailValidator/Validation/RFCValidationTest.php +++ b/Tests/EmailValidator/Validation/RFCValidationTest.php @@ -220,13 +220,13 @@ public function testInvalidEmailsWithWarningsCheck($expectedWarnings, $email) { $this->assertTrue($this->validator->isValid($email, $this->lexer)); $warnings = $this->validator->getWarnings(); - $this->assertTrue( - count($warnings) === count($expectedWarnings), + $this->assertCount( + count($warnings), $expectedWarnings, "Expected: " . implode(",", $expectedWarnings) . " and got " . implode(",", $warnings) ); foreach ($warnings as $warning) { - $this->assertTrue(isset($expectedWarnings[$warning->code()])); + $this->assertArrayHasKey($warning->code(), $expectedWarnings); } }