Skip to content

Commit 63c034a

Browse files
committed
Avoid deprecations when using the masterminds/html5 HTML5 parser
1 parent 882839c commit 63c034a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/End2End/End2EndTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ public function testGet404(): void
9090
{
9191
$client = static::createClient(['debug' => false]);
9292

93+
if (method_exists($client, 'useHtml5Parser')) {
94+
$client->useHtml5Parser(false);
95+
}
96+
9397
try {
9498
$client->request('GET', '/missing-page');
9599

@@ -113,6 +117,10 @@ public function testGetBadRequest(): void
113117
{
114118
$client = static::createClient(['debug' => false]);
115119

120+
if (method_exists($client, 'useHtml5Parser')) {
121+
$client->useHtml5Parser(false);
122+
}
123+
116124
$client->request('GET', '/bad-request');
117125

118126
$response = $client->getResponse();
@@ -127,6 +135,10 @@ public function testGet500(): void
127135
{
128136
$client = static::createClient();
129137

138+
if (method_exists($client, 'useHtml5Parser')) {
139+
$client->useHtml5Parser(false);
140+
}
141+
130142
try {
131143
$client->request('GET', '/exception');
132144

0 commit comments

Comments
 (0)