mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-30 12:07:59 +00:00
Use dedicated PHPUnit assertion methods (#159)
This commit is contained in:
committed by
Eduardo Gulias Davis
parent
74c0f07434
commit
a0e0fadfce
@@ -220,13 +220,13 @@ class RFCValidationTest extends TestCase
|
||||
{
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user