!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/local/lib/php/test/HTML_Template_IT/tests/   drwxr-xr-x
Free 318.31 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

class IT_Usage_TestCase extends PHPUnit_TestCase
{
   
/**
    * An HTML_Template_IT object
    * @var object
    */
    
var $tpl;

    function 
IT_Usage_TestCase($name)
    {
        
$this->PHPUnit_TestCase($name);
    }

    function 
setUp()
    {
        
$this->tpl =& new HTML_Template_IT('./templates');
    }

    function 
tearDown()
    {
        unset(
$this->tpl);
    }

    function 
_stripWhitespace($str)
    {
        return 
preg_replace('/\\s+/'''$str);
    }

    function 
_methodExists($name
    {
        if (
in_array(strtolower($name), get_class_methods($this->tpl))) {
            return 
true;
        }
        
$this->assertTrue(false'method '$name ' not implemented in ' get_class($this->tpl));
        return 
false;
    }


   
/**
    * Tests iterations over two blocks
    *
    */
    
function testBlockIteration()
    {
        
$data = array(
            
'a',
            array(
'b', array('1''2''3''4')),
            
'c',
            array(
'd', array('5''6''7'))
        );
        
        
$result $this->tpl->loadTemplateFile('blockiteration.html'truetrue);
        if (
PEAR::isError($result)) {
            
$this->assertTrue(false'Error loading template file: '$result->getMessage());
        }
        foreach (
$data as $value) {
            if (
is_array($value)) {
                
$this->tpl->setVariable('outer'$value[0]);
                foreach (
$value[1] as $v) {
                    
$this->tpl->setVariable('inner'$v);
                    
$this->tpl->parse('inner_block');
                }
            } else {
                
$this->tpl->setVariable('outer'$value);
            }
            
$this->tpl->parse('outer_block');
        }
        
$this->assertEquals('a#b|1|2|3|4#c#d|5|6|7#'$this->_stripWhitespace($this->tpl->get()));
    }

   
/**
    * 
    *
    */
    
function testTouchBlockIteration()
    {
        
$data = array('a','b','c','d','e');
        
$result $this->tpl->loadTemplateFile('blockiteration.html'truetrue);
        if (
PEAR::isError($result)) {
            
$this->assertTrue(false'Error loading template file: '$result->getMessage());
        }
        for (
$i 0$i count($data); $i++) {
            
$this->tpl->setVariable('outer'$data[$i]);
            
// the inner_block is empty and should be removed
            
if (== $i 2) {
                
$this->tpl->touchBlock('inner_block');
            }
            
$this->tpl->parse('outer_block');
        }
        
$this->assertEquals('a|#b#c|#d#e|#'$this->_stripWhitespace($this->tpl->get()));
    }

    
// Not available in stock version

   /**
    *
    */
    /*
    function testHideBlockIteration()
    {
        if (!$this->_methodExists('hideBlock')) {
            return;
        }
        $data = array('a','b','c','d','e');
        $result = $this->tpl->loadTemplateFile('blockiteration.html', true, true);
        if (PEAR::isError($result)) {
            $this->assertTrue(false, 'Error loading template file: '. $result->getMessage());
        }
        for ($i = 0; $i < count($data); $i++) {
            $this->tpl->setVariable(array(
                'inner' => $i + 1,
                'outer' => $data[$i]
            ));
            // the inner_block is not empty, but should be removed
            if (0 == $i % 2) {
                $this->tpl->hideBlock('inner_block');
            }
            $this->tpl->parse('outer_block');
        }
        $this->assertEquals('a#b|2#c#d|4#e#', $this->_stripWhitespace($this->tpl->get()));
    }
    */
}
?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0282 ]--