Skip to content

Commit

Permalink
Fix tests for mb_decode_numericentity() in PHP 8.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Mar 31, 2024
1 parent 75477f8 commit b10bf3c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/Mbstring/MbstringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ public function testDecodeNumericEntity()
$this->assertSame('déjà � â ã', mb_decode_numericentity('déjà � á â', $convmap, 'UTF-8'));

$bogusDecEntities = 'déjà � áá &#&#225&#225 &#225 &#225t';
$this->assertSame('déjà � ââ &#&#225â â ât', mb_decode_numericentity($bogusDecEntities, $convmap, 'UTF-8'));
if (80200 > \PHP_VERSION_ID) {
$this->assertSame('déjà � ââ &#&#225â â ât', mb_decode_numericentity($bogusDecEntities, $convmap, 'UTF-8'));
} else {
$this->assertSame('déjà � ââ &#ââ â ât', mb_decode_numericentity($bogusDecEntities, $convmap, 'UTF-8'));
// Is "déjà � àà &#àà à àt" correct?
}

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

0 comments on commit b10bf3c

Please sign in to comment.