$82 GRAYBYTE WORDPRESS FILE MANAGER $85

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/php81/usr/share/pear/test/XML_Util/tests/

HOME
Current File : /opt/alt/php81/usr/share/pear/test/XML_Util/tests//GetDocTypeDeclarationTests.php
<?php

class GetDocTypeDeclarationTests extends AbstractUnitTests
{
    /**
     * @covers XML_Util::getDocTypeDeclaration()
     */
    public function testGetDocTypeDeclarationUsingRoot()
    {
        $expected = "<!DOCTYPE rootTag>";
        $this->assertEquals($expected, XML_Util::getDocTypeDeclaration("rootTag"));
    }

    /**
     * @covers XML_Util::getDocTypeDeclaration()
     */
    public function testGetDocTypeDeclarationUsingRootAndStringUri()
    {
        $expected = "<!DOCTYPE rootTag SYSTEM \"myDocType.dtd\">";
        $this->assertEquals($expected, XML_Util::getDocTypeDeclaration("rootTag", "myDocType.dtd"));
    }

    /**
     * @covers XML_Util::getDocTypeDeclaration()
     */
    public function testGetDocTypeDeclarationUsingRootAndArrayUri()
    {
        $uri = array(
            'uri' => 'http://pear.php.net/dtd/package-1.0',
            'id' => '-//PHP//PEAR/DTD PACKAGE 0.1'
        );
        $expected = "<!DOCTYPE rootTag PUBLIC \"-//PHP//PEAR/DTD PACKAGE 0.1\" \"http://pear.php.net/dtd/package-1.0\">";
        $this->assertEquals($expected, XML_Util::getDocTypeDeclaration("rootTag", $uri));
    }

    /**
     * @covers XML_Util::getDocTypeDeclaration()
     */
    public function testGetDocTypeDeclarationUsingRootAndArrayUriAndInternalDtd()
    {
        $uri = array(
            'uri' => 'http://pear.php.net/dtd/package-1.0',
            'id' => '-//PHP//PEAR/DTD PACKAGE 0.1'
        );
        $dtdEntry = '<!ELEMENT additionalInfo (#PCDATA)>';
        $expected =
<<< EOF
<!DOCTYPE rootTag PUBLIC "-//PHP//PEAR/DTD PACKAGE 0.1" "http://pear.php.net/dtd/package-1.0" [
<!ELEMENT additionalInfo (#PCDATA)>
]>
EOF;
        $this->assertEquals($expected, XML_Util::getDocTypeDeclaration("rootTag", $uri, $dtdEntry));
    }
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
13 May 2025 12.50 AM
root / root
0755
AbstractUnitTests.php
0.414 KB
13 May 2025 12.50 AM
root / root
0644
ApiVersionTests.php
0.216 KB
13 May 2025 12.50 AM
root / root
0644
AttributesToStringTests.php
7.521 KB
13 May 2025 12.50 AM
root / root
0644
Bug18343Tests.php
1.701 KB
13 May 2025 12.50 AM
root / root
0644
Bug21177Tests.php
1.029 KB
13 May 2025 12.50 AM
root / root
0644
Bug21184Tests.php
0.439 KB
13 May 2025 12.50 AM
root / root
0644
Bug4950Tests.php
0.712 KB
13 May 2025 12.50 AM
root / root
0644
Bug5392Tests.php
0.749 KB
13 May 2025 12.50 AM
root / root
0644
CollapseEmptyTagsTests.php
4.251 KB
13 May 2025 12.50 AM
root / root
0644
CreateCDataSectionTests.php
0.354 KB
13 May 2025 12.50 AM
root / root
0644
CreateCommentTests.php
0.332 KB
13 May 2025 12.50 AM
root / root
0644
CreateEndElementTests.php
0.599 KB
13 May 2025 12.50 AM
root / root
0644
CreateStartElementTests.php
5.283 KB
13 May 2025 12.50 AM
root / root
0644
CreateTagFromArrayTests.php
13.176 KB
13 May 2025 12.50 AM
root / root
0644
CreateTagTests.php
7.791 KB
13 May 2025 12.50 AM
root / root
0644
GetDocTypeDeclarationTests.php
1.737 KB
13 May 2025 12.50 AM
root / root
0644
GetXmlDeclarationTests.php
1.137 KB
13 May 2025 12.50 AM
root / root
0644
IsValidNameTests.php
1.937 KB
13 May 2025 12.50 AM
root / root
0644
RaiseErrorTests.php
0.438 KB
13 May 2025 12.50 AM
root / root
0644
ReplaceEntitiesTests.php
4.22 KB
13 May 2025 12.50 AM
root / root
0644
ReverseEntitiesTests.php
4.209 KB
13 May 2025 12.50 AM
root / root
0644
SplitQualifiedNameTests.php
0.819 KB
13 May 2025 12.50 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF