From fb9faf10f784fd97d0723b1e37547e76ae93c57e Mon Sep 17 00:00:00 2001 From: Thomas Ploch Date: Tue, 13 Jul 2010 18:34:08 +0200 Subject: [PATCH] Added missing option arrays to abstract function definitions in JsBaseEngineHelper. Fixed test cases accordingly. Fixes #704 . --- cake/libs/view/helpers/js.php | 6 +++--- cake/tests/cases/libs/view/helpers/js.test.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cake/libs/view/helpers/js.php b/cake/libs/view/helpers/js.php index 887276cb0..6e429629c 100644 --- a/cake/libs/view/helpers/js.php +++ b/cake/libs/view/helpers/js.php @@ -912,7 +912,7 @@ abstract class JsBaseEngineHelper extends AppHelper { * @param array $options Array of options for the sortable. See above. * @return string Completed sortable script. */ - abstract public function sortable(); + abstract public function sortable($options = array()); /** * Create a slider UI widget. Comprised of a track and knob. @@ -934,7 +934,7 @@ abstract class JsBaseEngineHelper extends AppHelper { * * @return string Completed slider script */ - abstract public function slider(); + abstract public function slider($options = array()); /** * Serialize the form attached to $selector. * Pass `true` for $isForm if the current selection is a form element. @@ -949,7 +949,7 @@ abstract class JsBaseEngineHelper extends AppHelper { * @param array $options options for serialization generation. * @return string completed form serialization script */ - abstract public function serializeForm(); + abstract public function serializeForm($options = array()); /** * Parse an options assoc array into an Javascript object literal. diff --git a/cake/tests/cases/libs/view/helpers/js.test.php b/cake/tests/cases/libs/view/helpers/js.test.php index b5653d72f..5db01a906 100644 --- a/cake/tests/cases/libs/view/helpers/js.test.php +++ b/cake/tests/cases/libs/view/helpers/js.test.php @@ -52,13 +52,13 @@ class OptionEngineHelper extends JsBaseEngineHelper { function event($type, $callback, $options = array()) {} function domReady($functionBody) {} function each($callback) {} - function effect($name, $options) {} + function effect($name, $options = array()) {} function request($url, $options = array()) {} function drag($options = array()) {} function drop($options = array()) {} - function sortable() {} - function slider() {} - function serializeForm() {} + function sortable($options = array()) {} + function slider($options = array()) {} + function serializeForm($options = array()) {} } /**