!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/lampp/lib/php/test/MDB_QueryTool/tests/   drwxr-xr-x
Free 13.45 GB of 61.93 GB (21.72%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     GetCountTest.php (2.33 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//
//  $Id: GetCountTest.php 322084 2012-01-11 17:50:45Z danielc $
//

require_once dirname(__FILE__) . '/TestCase.php';

class 
tests_GetCountTest extends tests_TestCase
{
    function 
_setup($mode)
    {
        
$this->user = new tests_Common(TABLE_USER);
        switch (
$mode) {
            case 
'6':
                
$this->user->add(array('name'=>'x'));
                
$this->user->add(array('name'=>'y'));
                
$this->user->add(array('name'=>'z'));
            case 
'3':
                
$this->user->add(array('name'=>'x'));
                
$this->user->add(array('name'=>'y'));
                
$this->user->add(array('name'=>'z'));
                break;
        }
    }

    function 
test_getCount3()
    {
        
$this->_setup(3);
        
$this->assertEquals(3,$this->user->getCount(),'Wrong count after inserting 3 rows');
    }

    function 
test_getCount6()
    {
        
$this->_setup(6);
        
$this->assertEquals(6,$this->user->getCount(),'Wrong count after inserting 6 rows');
    }

    function 
test_getCountGrouped3()
    {
        
$this->_setup(6);
        
$this->user->setGroup('name');
        
$this->assertEquals(3,$this->user->getCount(),'Wrong count after 6 inserted and grouping them by name');
    }

    function 
test_getCountGrouped2()
    {
        
$this->_setup(6);
        
$this->user->setWhere("name='z'");
        
$this->assertEquals(2,$this->user->getCount(),'setWhere and setGroup should have resulted in two');
    }

    function 
test_getCountGrouped1()
    {
        
$this->_setup(6);
        
$this->user->setGroup('name');
        
$this->user->setWhere("name='z'");
        
$this->assertEquals(1,$this->user->getCount(),'setWhere and setGroup should have resulted in one');
    }

    function 
test_getCountGrouped0()
    {
        
$this->_setup(6);
        
$this->user->setGroup('name');
        
$this->user->setWhere("name='xxx'");
        
$this->assertEquals(0,$this->user->getCount(),'setWhere and setGroup should have resulted in one');
    }

    function 
test_getCountWithOffset()
    {
        
$this->_setup(6);
        
$this->user->setLimit(05);
        
$this->assertEquals(6$this->user->getCount(),'setLimit and setGroup should have resulted in one');

        
$this->user->setLimit(55);
        
$this->assertEquals(6$this->user->getCount(),'setLimit and setGroup should have resulted in one');
    }

}

?>

:: 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 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.61 ]--