Removing params() it was a pretty much useless function, and was deprecated.

This commit is contained in:
Mark Story 2010-04-23 21:32:23 -04:00
parent 84002687c8
commit d926a379b4
2 changed files with 0 additions and 34 deletions

View file

@ -204,23 +204,6 @@ if (!function_exists('sortByKey')) {
}
}
/**
* Display parameters.
*
* @param mixed $p Parameter as string or array
* @return string
* @deprecated Will be removed in 2.0
*/
function params($p) {
if (!is_array($p) || count($p) == 0) {
return null;
}
if (is_array($p[0]) && count($p) == 1) {
return $p[0];
}
return $p;
}
/**
* Merge a group of arrays
*

View file

@ -582,23 +582,6 @@ class BasicsTest extends CakeTestCase {
$this->assertEqual($result, $expected);
}
/**
* test params()
*
* @return void
*/
public function testParams() {
$this->assertNull(params('weekend'));
$this->assertNull(params(array()));
$this->assertEqual(params(array('weekend')), array('weekend'));
$nested = array(array('weekend'));
$this->assertEqual(params($nested), array('weekend'));
$multiple = array(array('weekend'), 'jean-luc', 'godard');
$this->assertEqual(params($multiple), $multiple);
}
/**
* test stripslashes_deep()
*