diff --git a/typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php b/typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php index 4d249b1c6568b28f2e30ac2cd23bfdf7a6318e94..9560a899bd72742de331595eb3c7b2f7595fc238 100644 --- a/typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php +++ b/typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php @@ -865,14 +865,13 @@ class SlugSiteRequestTest extends AbstractTestCase $this->internalRequestContext ->withFrontendUserId($frontendUserId) ); - $json = json_decode((string)$response->getBody(), true); self::assertSame( 403, $response->getStatusCode() ); self::assertThat( - $json['body'] ?? null, + (string)$response->getBody(), self::logicalOr( self::stringContains('That page is forbidden to you'), self::stringContains('ID was not an accessible page'), @@ -1029,14 +1028,13 @@ class SlugSiteRequestTest extends AbstractTestCase $this->internalRequestContext ->withFrontendUserId($frontendUserId) ); - $json = json_decode((string)$response->getBody(), true); self::assertSame( 403, $response->getStatusCode() ); self::assertThat( - $json['body'] ?? null, + (string)$response->getBody(), self::logicalOr( self::stringContains('That page is forbidden to you'), self::stringContains('ID was not an accessible page'), @@ -1226,13 +1224,13 @@ class SlugSiteRequestTest extends AbstractTestCase new InternalRequest($uri), $this->internalRequestContext ); - $json = json_decode((string)$response->getBody(), true); + self::assertSame( 404, $response->getStatusCode() ); self::assertThat( - $json['body'] ?? null, + (string)$response->getBody(), self::stringContains('That page was not found') ); }