Skip to content

Commit 3cef459

Browse files
committed
Fix tests for mb_decode_numericentity() in PHP 8.2+
1 parent 75477f8 commit 3cef459

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Mbstring/MbstringTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ public function testDecodeNumericEntity()
105105
$this->assertSame('déjà � â ã', mb_decode_numericentity('déjà � á â', $convmap, 'UTF-8'));
106106

107107
$bogusDecEntities = 'déjà � áá &#&#225&#225 &#225 &#225t';
108-
$this->assertSame('déjà � ââ &#&#225â â ât', mb_decode_numericentity($bogusDecEntities, $convmap, 'UTF-8'));
108+
if (80200 > \PHP_VERSION_ID) {
109+
$this->assertSame('déjà � ââ &#&#225â â ât', mb_decode_numericentity($bogusDecEntities, $convmap, 'UTF-8'));
110+
} else {
111+
$this->assertSame('déjà � àà &#àà à àt', mb_decode_numericentity($bogusDecEntities, $convmap, 'UTF-8'));
112+
}
109113

110114
$bogusHexEntities = 'déjà � áá &#xe1 &#xe1t &#xE1 &#xE1t';
111115
$this->assertSame('déjà � ââ â ât â ât', mb_decode_numericentity($bogusHexEntities, $convmap, 'UTF-8'));

0 commit comments

Comments
 (0)