From 63c034a9ebe83d83c8e18c8969c992fed941c25a Mon Sep 17 00:00:00 2001 From: Stefano Arlandini Date: Mon, 4 Dec 2023 23:53:37 +0100 Subject: [PATCH] Avoid deprecations when using the `masterminds/html5` HTML5 parser --- tests/End2End/End2EndTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/End2End/End2EndTest.php b/tests/End2End/End2EndTest.php index 7eef4ffd..d45e92bd 100644 --- a/tests/End2End/End2EndTest.php +++ b/tests/End2End/End2EndTest.php @@ -90,6 +90,10 @@ public function testGet404(): void { $client = static::createClient(['debug' => false]); + if (method_exists($client, 'useHtml5Parser')) { + $client->useHtml5Parser(false); + } + try { $client->request('GET', '/missing-page'); @@ -113,6 +117,10 @@ public function testGetBadRequest(): void { $client = static::createClient(['debug' => false]); + if (method_exists($client, 'useHtml5Parser')) { + $client->useHtml5Parser(false); + } + $client->request('GET', '/bad-request'); $response = $client->getResponse(); @@ -127,6 +135,10 @@ public function testGet500(): void { $client = static::createClient(); + if (method_exists($client, 'useHtml5Parser')) { + $client->useHtml5Parser(false); + } + try { $client->request('GET', '/exception');