Skip to content

Commit a941d1b

Browse files
committed
Comment mentions: Fixed CI and test scenarios
1 parent 51f9b63 commit a941d1b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/Config/database.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
'strict' => false,
8282
'engine' => null,
8383
'options' => extension_loaded('pdo_mysql') ? array_filter([
84+
// @phpstan-ignore class.notFound
8485
(PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : \PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
8586
]) : [],
8687
],

tests/Activity/CommentMentionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public function test_mentions_are_notified()
2424
$notifications->assertSentTo($userToMention, function (CommentMentionNotification $notification) use ($userToMention, $editor, $page) {
2525
$mail = $notification->toMail($userToMention);
2626
$mailContent = html_entity_decode(strip_tags($mail->render()), ENT_QUOTES);
27-
return $mail->subject === 'You have been mentioned in a comment on page: ' . $page->name
27+
$subjectPrefix = 'You have been mentioned in a comment on page: ' . mb_substr($page->name, 0, 20);
28+
return str_starts_with($mail->subject, $subjectPrefix)
2829
&& str_contains($mailContent, 'View Comment')
2930
&& str_contains($mailContent, 'Page Name: ' . $page->name)
3031
&& str_contains($mailContent, 'Page Path: ' . $page->book->getShortName(24) . ' > ' . $page->chapter->getShortName(24))

0 commit comments

Comments
 (0)