Use dedicated PHPUnit assertion methods (#159)

This commit is contained in:
Gabriel Caruso
2018-01-05 20:47:59 -02:00
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);
}
}