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) <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-05-11 22:58:29 +12:00
parent e6a93d4a9f
commit d2e4ed6a11
@@ -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');