Skip to content

Commit

Permalink
Updating test cases to work with JsBaseEngineHelper being abstract.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 21, 2010
1 parent 2d20215 commit e14d8e5
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions cake/tests/cases/libs/view/helpers/js.test.php
Expand Up @@ -50,6 +50,18 @@ function testMap($options = array()) {
function testParseOptions($options, $safe = array()) {
return $this->_parseOptions($options, $safe);
}

function get($selector) {}
function event($type, $callback, $options = array()) {}
function domReady($functionBody) {}
function each($callback) {}
function effect($name, $options) {}
function request($url, $options = array()) {}
function drag($options = array()) {}
function drop($options = array()) {}
function sortable() {}
function slider() {}
function serializeForm() {}
}

/**
Expand Down Expand Up @@ -83,11 +95,11 @@ function startTest() {
$this->_asset = Configure::read('Asset.timestamp');
Configure::write('Asset.timestamp', false);

$this->Js = new JsHelper('JsBase');
$this->Js = new JsHelper('Option');
$this->Js->Html = new HtmlHelper();
$this->Js->Form = new FormHelper();
$this->Js->Form->Html = new HtmlHelper();
$this->Js->JsBaseEngine = new JsBaseEngineHelper();
$this->Js->OptionEngine = new OptionEngineHelper();

$view = new JsHelperMockView();
ClassRegistry::addObject('view', $view);
Expand Down Expand Up @@ -578,7 +590,7 @@ class JsBaseEngineTestCase extends CakeTestCase {
* @return void
*/
function startTest() {
$this->JsEngine = new JsBaseEngineHelper();
$this->JsEngine = new OptionEngineHelper();
}
/**
* endTest method
Expand Down

0 comments on commit e14d8e5

Please sign in to comment.