Avoiding the load of default connection in Sanitize test

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-27 01:40:25 -04:30
parent 01f6744e35
commit faa8b3d324

View file

@ -170,12 +170,12 @@ class SanitizeTest extends CakeTestCase {
$array = array(array('\\$', array('key' => 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . '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);
$string = '';
$expected = '';
$result = Sanitize::clean($string);
$result = Sanitize::clean($string, array('connection' => 'test'));
$this->assertEqual($string, $expected);
$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);
}