From f2c43c14bf511e0ec2dfb591bc654a1fed075665 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 29 Mar 2025 19:20:27 +0530 Subject: [PATCH] fix: realtime test. --- tests/e2e/Services/Realtime/RealtimeCustomClientTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 2e9165b93f..b4d202f811 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -613,7 +613,8 @@ class RealtimeCustomClientTest extends Scope $response = json_decode($client->receive(), true); $lastEmail = $this->getLastEmail(); - $recovery = substr($lastEmail['text'], strpos($lastEmail['text'], '&secret=', 0) + 8, 256); + $tokens = $this->extractQueryParamsFromEmailLink($lastEmail['html']); + $recovery = $tokens['secret']; $this->assertArrayHasKey('type', $response); $this->assertArrayHasKey('data', $response);