mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-12-19 10:42:29 +03:00
Comment mentions: Fixed CI and test scenarios
This commit is contained in:
@@ -81,6 +81,7 @@ return [
|
||||
'strict' => false,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
// @phpstan-ignore class.notFound
|
||||
(PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : \PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
@@ -24,7 +24,8 @@ class CommentMentionTest extends TestCase
|
||||
$notifications->assertSentTo($userToMention, function (CommentMentionNotification $notification) use ($userToMention, $editor, $page) {
|
||||
$mail = $notification->toMail($userToMention);
|
||||
$mailContent = html_entity_decode(strip_tags($mail->render()), ENT_QUOTES);
|
||||
return $mail->subject === 'You have been mentioned in a comment on page: ' . $page->name
|
||||
$subjectPrefix = 'You have been mentioned in a comment on page: ' . mb_substr($page->name, 0, 20);
|
||||
return str_starts_with($mail->subject, $subjectPrefix)
|
||||
&& str_contains($mailContent, 'View Comment')
|
||||
&& str_contains($mailContent, 'Page Name: ' . $page->name)
|
||||
&& str_contains($mailContent, 'Page Path: ' . $page->book->getShortName(24) . ' > ' . $page->chapter->getShortName(24))
|
||||
|
||||
Reference in New Issue
Block a user