mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-12-17 14:13:58 +01:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
|
@ -2,20 +2,20 @@
|
|||
/**
|
||||
* SanitizeTest file
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
|
||||
* @package Cake.Test.Case.Utility
|
||||
* @since CakePHP(tm) v 1.2.0.5428
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('Sanitize', 'Utility');
|
||||
|
||||
/**
|
||||
|
|
@ -25,17 +25,10 @@ App::uses('Sanitize', 'Utility');
|
|||
*/
|
||||
class SanitizeDataTest extends CakeTestModel {
|
||||
|
||||
/**
|
||||
* name property
|
||||
*
|
||||
* @var string 'SanitizeDataTest'
|
||||
*/
|
||||
public $name = 'SanitizeDataTest';
|
||||
|
||||
/**
|
||||
* useTable property
|
||||
*
|
||||
* @var string 'data_tests'
|
||||
* @var string
|
||||
*/
|
||||
public $useTable = 'data_tests';
|
||||
}
|
||||
|
|
@ -47,17 +40,10 @@ class SanitizeDataTest extends CakeTestModel {
|
|||
*/
|
||||
class SanitizeArticle extends CakeTestModel {
|
||||
|
||||
/**
|
||||
* name property
|
||||
*
|
||||
* @var string 'Article'
|
||||
*/
|
||||
public $name = 'SanitizeArticle';
|
||||
|
||||
/**
|
||||
* useTable property
|
||||
*
|
||||
* @var string 'articles'
|
||||
* @var string
|
||||
*/
|
||||
public $useTable = 'articles';
|
||||
}
|
||||
|
|
@ -72,7 +58,7 @@ class SanitizeTest extends CakeTestCase {
|
|||
/**
|
||||
* autoFixtures property
|
||||
*
|
||||
* @var bool false
|
||||
* @var bool
|
||||
*/
|
||||
public $autoFixtures = false;
|
||||
|
||||
|
|
@ -168,7 +154,7 @@ class SanitizeTest extends CakeTestCase {
|
|||
$string = '';
|
||||
$expected = '';
|
||||
$result = Sanitize::clean($string, array('connection' => 'test'));
|
||||
$this->assertEquals($expected, $string);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$data = array(
|
||||
'Grant' => array(
|
||||
|
|
@ -283,12 +269,12 @@ class SanitizeTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = "x' AND 1=(SELECT COUNT(*) FROM users); --";
|
||||
$expected = "xAND1SELECTCOUNTFROMusers";
|
||||
$expected = 'xAND1SELECTCOUNTFROMusers';
|
||||
$result = Sanitize::paranoid($string);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$string = "x'; DROP TABLE members; --";
|
||||
$expected = "xDROPTABLEmembers";
|
||||
$expected = 'xDROPTABLEmembers';
|
||||
$result = Sanitize::paranoid($string);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue