From a941d1b403f66d1162f0a23d4dc88a99234b9423 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 18 Dec 2025 17:40:05 +0000 Subject: [PATCH] Comment mentions: Fixed CI and test scenarios --- app/Config/database.php | 1 + tests/Activity/CommentMentionTest.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Config/database.php b/app/Config/database.php index 86bae5f5b..6fc861312 100644 --- a/app/Config/database.php +++ b/app/Config/database.php @@ -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'), ]) : [], ], diff --git a/tests/Activity/CommentMentionTest.php b/tests/Activity/CommentMentionTest.php index 57a36895e..7f26f8689 100644 --- a/tests/Activity/CommentMentionTest.php +++ b/tests/Activity/CommentMentionTest.php @@ -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))