mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Avoiding the load of default connection in Sanitize test
This commit is contained in:
parent
01f6744e35
commit
faa8b3d324
1 changed files with 3 additions and 3 deletions
|
@ -170,12 +170,12 @@ class SanitizeTest extends CakeTestCase {
|
||||||
|
|
||||||
$array = array(array('\\$', array('key' => 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line')));
|
$array = array(array('\\$', array('key' => 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line')));
|
||||||
$expected = array(array('$', array('key' => 'test & "quote" \'other\' ;.$ $ symbol.another line')));
|
$expected = array(array('$', array('key' => 'test & "quote" \'other\' ;.$ $ symbol.another line')));
|
||||||
$result = Sanitize::clean($array, array('encode' => false, 'escape' => false));
|
$result = Sanitize::clean($array, array('encode' => false, 'escape' => false, 'connection' => 'test'));
|
||||||
$this->assertEqual($expected, $result);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
$string = '';
|
$string = '';
|
||||||
$expected = '';
|
$expected = '';
|
||||||
$result = Sanitize::clean($string);
|
$result = Sanitize::clean($string, array('connection' => 'test'));
|
||||||
$this->assertEqual($string, $expected);
|
$this->assertEqual($string, $expected);
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
|
@ -198,7 +198,7 @@ class SanitizeTest extends CakeTestCase {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$result = Sanitize::clean($data);
|
$result = Sanitize::clean($data, array('connection' => 'test'));
|
||||||
$this->assertEqual($result, $data);
|
$this->assertEqual($result, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue