diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-12-19 01:41:02 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2023-01-31 04:58:04 +0100 |
commit | 49705254cf38f838d06d94b2eac5f58bc78d74a1 (patch) | |
tree | 7b853a7ce295c8933c0a75756f94b7c280eb8eed /tests | |
parent | 48f1d414b200b64f3495f6669f78221e4d747f3a (diff) |
Extract expected URL to its own variable
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php/Signaling/BackendNotifierTest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/php/Signaling/BackendNotifierTest.php b/tests/php/Signaling/BackendNotifierTest.php index 56eeb8203..a711fcf44 100644 --- a/tests/php/Signaling/BackendNotifierTest.php +++ b/tests/php/Signaling/BackendNotifierTest.php @@ -208,9 +208,11 @@ class BackendNotifierTest extends TestCase { } private function assertMessageWasSent(Room $room, array $message): void { + $expectedUrl = $this->baseUrl . '/api/v1/room/' . $room->getToken(); + $requests = $this->controller->getRequests(); - $bodies = array_map(function ($request) use ($room) { - return json_decode($this->validateBackendRequest($this->baseUrl . '/api/v1/room/' . $room->getToken(), $request), true); + $bodies = array_map(function ($request) use ($expectedUrl) { + return json_decode($this->validateBackendRequest($expectedUrl, $request), true); }, $requests); $bodies = array_filter($bodies, function (array $body) use ($message) { |