Skip to content

Commit

Permalink
Avoid deprecations when using the masterminds/html5 HTML5 parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ste93cry committed Dec 4, 2023
1 parent 882839c commit 63c034a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/End2End/End2EndTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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();
Expand All @@ -127,6 +135,10 @@ public function testGet500(): void
{
$client = static::createClient();

if (method_exists($client, 'useHtml5Parser')) {
$client->useHtml5Parser(false);
}

try {
$client->request('GET', '/exception');

Expand Down

0 comments on commit 63c034a

Please sign in to comment.