From a1a54a152b1cba84359d1fd31112b3aa1492833c Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 12 Mar 2009 23:48:19 -0400 Subject: [PATCH] Adding methods to baseEngine Removing file inclusion from JsHelper Adding writeCache to JsHelper Adding tests. --- cake/libs/view/helpers/js.php | 187 ++++++++++-------- .../tests/cases/libs/view/helpers/js.test.php | 166 +++++----------- 2 files changed, 151 insertions(+), 202 deletions(-) diff --git a/cake/libs/view/helpers/js.php b/cake/libs/view/helpers/js.php index cd83aceb3..74849b513 100644 --- a/cake/libs/view/helpers/js.php +++ b/cake/libs/view/helpers/js.php @@ -85,7 +85,7 @@ class JsHelper extends AppHelper { * * @var array **/ - var $helpers = array(); + var $helpers = array('Html'); /** * HTML tags used by this helper. * @@ -105,13 +105,6 @@ class JsHelper extends AppHelper { * @access private **/ var $__engineName; -/** - * Scripts that have already been included once, prevents duplicate script insertion - * - * @var array - * @access private - **/ - var $__includedScripts = array(); /** * __objects * @@ -144,7 +137,7 @@ class JsHelper extends AppHelper { } $this->__engineName = $className . 'Engine'; $engineClass = $engineName . 'Engine'; - $this->helpers = array($engineClass); + $this->helpers[] = $engineClass; parent::__construct(); } /** @@ -165,80 +158,40 @@ class JsHelper extends AppHelper { trigger_error(sprintf(__('JsHelper:: Missing Method %s is undefined', true), $method), E_USER_WARNING); } /** - * Returns one or many