!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/5.6.40 

uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24
01:42:00 EDT 2020 x86_64
 

uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) 

Safe-mode: OFF (not secure)

/opt/cpanel/ea-php74/root/usr/share/tests/pear/XML_Util/tests/   drwxr-xr-x
Free 235.86 GB of 981.82 GB (24.02%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     CreateStartElementTests.php (5.28 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

class CreateStartElementTests extends AbstractUnitTests
{
    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagOnly()
    {
        
$original "myNs:myTag";
        
$expected "<myNs:myTag>";
        
$this->assertEquals($expectedXML_Util::createStartElement($original));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithAttributes()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes = array("foo" => "bar");
        
$expected "<myNs:myTag foo=\"bar\">";
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithEmptyAttributes()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes "";
        
$expected "<myNs:myTag>";
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithAttributesAndNamespace()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes = array("foo" => "bar");
        
$originalNamespace "http://www.w3c.org/myNs#";
        
$expected "<myNs:myTag foo=\"bar\" xmlns:myNs=\"http://www.w3c.org/myNs#\">";
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes$originalNamespace));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithEmptyAttributesAndNonUriNamespace()
    {
        
$originalTag "myTag";
        
$originalAttributes "";
        
$originalNamespace "foo";
        
$expected "<myTag xmlns=\"foo\">";
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes$originalNamespace));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithAttributesAndNamespaceWithMultiline()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes = array("foo" => "bar");
        
$originalNamespace "http://www.w3c.org/myNs#";
        
$expected =
<<< EOF
<myNs:myTag foo="bar"
            xmlns:myNs="http://www.w3c.org/myNs#">
EOF;
        
$multiline true;
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes$originalNamespace$multiline));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithAttributesAndNamespaceWithMultilineAndIndent()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes = array("foo" => "bar");
        
$originalNamespace "http://www.w3c.org/myNs#";
        
$expected =
<<< EOF
<myNs:myTag foo="bar"
  xmlns:myNs="http://www.w3c.org/myNs#">
EOF;
        
$multiline true;
        
$indent "  ";
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes$originalNamespace$multiline$indent));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithAttributesAndNamespaceWithMultilineAndIndentAndLinebreak()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes = array("foo" => "bar");
        
$originalNamespace "http://www.w3c.org/myNs#";
        
$expected "<myNs:myTag foo=\"bar\"^  xmlns:myNs=\"http://www.w3c.org/myNs#\">";
        
$multiline true;
        
$indent "  ";
        
$linebreak "^";
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes$originalNamespace$multiline$indent$linebreak));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithAttributesAndNamespaceWithMultilineAndIndentAndLinebreakAndSortAttributesIsTrue()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes = array("foo" => "bar""boo" => "baz");
        
$originalNamespace "http://www.w3c.org/myNs#";
        
$expected "<myNs:myTag boo=\"baz\"^  foo=\"bar\"^  xmlns:myNs=\"http://www.w3c.org/myNs#\">";
        
$multiline true;
        
$indent "  ";
        
$linebreak "^";
        
$sortAttributes true;
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes$originalNamespace$multiline$indent$linebreak$sortAttributes));
    }

    
/**
     * @covers XML_Util::createStartElement()
     */
    
public function testCreateStartElementForTagWithAttributesAndNamespaceWithMultilineAndIndentAndLinebreakAndSortAttributesIsFalse()
    {
        
$originalTag "myNs:myTag";
        
$originalAttributes = array("foo" => "bar""boo" => "baz");
        
$originalNamespace "http://www.w3c.org/myNs#";
        
$expected "<myNs:myTag foo=\"bar\"^  boo=\"baz\"^  xmlns:myNs=\"http://www.w3c.org/myNs#\">";
        
$multiline true;
        
$indent "  ";
        
$linebreak "^";
        
$sortAttributes false;
        
$this->assertEquals($expectedXML_Util::createStartElement($originalTag$originalAttributes$originalNamespace$multiline$indent$linebreak$sortAttributes));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0539 ]--