Fix slash email test

This commit is contained in:
ErickSkrauch 2023-10-15 06:54:35 +02:00
parent b3d1f75cc0
commit 984c6e7682
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -93,7 +93,7 @@ final class EmailValidatorTest extends TestCase {
$this->getFunctionMock(YiiEmailValidator::class, 'checkdnsrr')->expects($this->any())->willReturn(true); $this->getFunctionMock(YiiEmailValidator::class, 'checkdnsrr')->expects($this->any())->willReturn(true);
$this->getFunctionMock(YiiEmailValidator::class, 'dns_get_record')->expects($this->any())->willReturn(['mx.google.com']); $this->getFunctionMock(YiiEmailValidator::class, 'dns_get_record')->expects($this->any())->willReturn(['mx.google.com']);
$model = $this->createModel('\slash@gmail.com'); $model = $this->createModel('/slash@gmail.com');
$this->validator->validateAttribute($model, 'field'); $this->validator->validateAttribute($model, 'field');
$this->assertSame(['error.email_invalid'], $model->getErrors('field')); $this->assertSame(['error.email_invalid'], $model->getErrors('field'));
} }