Fix errors in tests RichTextToEmailHtmlConverterCest (#5241)

This commit is contained in:
Yuriy Bakhtin 2021-08-22 13:32:15 +03:00 committed by GitHub
parent 9bc9f89ded
commit b138a00b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,12 +52,12 @@ class RichTextToEmailHtmlConverterCest
protected function linkIsDetectedInEmail(string $emailMessage, array $link): bool
{
return (bool)preg_match('/with link <a href="' . preg_quote($link['url'], '/') . '".+?>' . preg_quote($link['text'], '/') . '<\/a>/is', $emailMessage);
return (bool)preg_match('/with link <a href="' . preg_quote($link['url'], '/') . '".+?> ' . preg_quote($link['text'], '/') . ' <\/a>/is', $emailMessage);
}
protected function linkedImageIsDetectedInEmail(string $emailMessage, array $link): bool
{
return (bool)preg_match('/with linked image <a href="' . preg_quote($link['url'], '/') . '".+?><img.+?src=".+?&amp;token=.+?".+?><\/a>/is', $emailMessage);
return (bool)preg_match('/with linked image <a href="' . preg_quote($link['url'], '/') . '".+?> <img.+?src=".+?&amp;token=.+?".+?><\/a>/is', $emailMessage);
}
protected function createFile(): File