From d2e4ed6a11d99a124a0dc271d4bdfefa8640513e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 11 May 2026 22:58:29 +1200 Subject: [PATCH] test(messaging): skip users recipient test when push DSN not configured CI lacks _APP_MESSAGE_PUSH_TEST_DSN, so new DSN(null) threw a TypeError before the existing skip guard could run. Match the pattern used by testSendPushNotification: gate on the env var first, then construct the DSN. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/e2e/Services/Messaging/MessagingBase.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/e2e/Services/Messaging/MessagingBase.php b/tests/e2e/Services/Messaging/MessagingBase.php index 76c66bfe6b..43dc58d44c 100644 --- a/tests/e2e/Services/Messaging/MessagingBase.php +++ b/tests/e2e/Services/Messaging/MessagingBase.php @@ -2527,6 +2527,10 @@ trait MessagingBase public function testCreatePushNotificationWithUsersRecipients(): void { + if (empty(System::getEnv('_APP_MESSAGE_PUSH_TEST_DSN'))) { + $this->markTestSkipped('Push DSN empty'); + } + $dsn = new DSN(System::getEnv('_APP_MESSAGE_PUSH_TEST_DSN')); $to = $dsn->getParam('to'); $serviceAccountJSON = $dsn->getParam('serviceAccountJSON');