Server : LiteSpeed
System : Linux server900.shared.spaceship.host 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
User : kvzyqrttyz ( 5084)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/cpanel/ea-php81/root/usr/share/tests/pear/XML_Util/tests/

πŸ“ Create New:
⬆️ Upload File:
Current Dir [ Not Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

πŸ“„ File: Bug5392Tests.php

Path: //opt/cpanel/ea-php81/root/usr/share/tests/pear/XML_Util/tests/Bug5392Tests.php

Size: 767 B

Permissions: 0644

<?php

/**
 * Bug #5392 "encoding of ISO-8859-1 is the only supported encoding"
 *
 * Original characters of the given encoding that are "replaced"
 * should then "reverse" back to perfectly match the original.
 *
 * @link https://pear.php.net/bugs/bug.php?id=5392
 */
class Bug5392Tests extends AbstractUnitTests
{
    public function testReplaceEntitiesForBug5392()
    {
        $original = 'This data contains special chars like <, >, & and " as well as Γ€, ΓΆ, ß, Γ  and Γͺ';
        $replacedResult = XML_Util::replaceEntities($original, XML_UTIL_ENTITIES_HTML, "UTF-8");
        $reversedResult = XML_Util::reverseEntities($replacedResult, XML_UTIL_ENTITIES_HTML, "UTF-8");
        $this->assertEquals($original, $reversedResult, "Failed bugcheck.");
    }
}

← Back to Directory Edit File πŸ”’ Chmod

WP File Manager