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: Bug4950Tests.php

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

Size: 729 B

Permissions: 0644

<?php

/**
 * Bug #4950 "Incorrect CDATA serializing"
 *
 * Content that looks like CDATA end characters and tags
 * should still be recognized solely as content text.
 *
 * @link https://pear.php.net/bugs/bug.php?id=4950
 */
class Bug4950Tests extends AbstractUnitTests
{
    public function testCreateTagForBug4950()
    {
        $qname = "test";
        $attributes = array();
        $content = "Content ]]></test> here!";
        $namespaceUrl = null;
        $expected = "<test><![CDATA[Content ]]]]><![CDATA[></test> here!]]></test>";
        $result = XML_Util::createTag($qname, $attributes, $content, $namespaceUrl, XML_UTIL_CDATA_SECTION);
        $this->assertEquals($expected, $result, "Failed bugcheck.");
    }
}

← Back to Directory Edit File 🔒 Chmod

WP File Manager