Removing methods that are being/moved removed.

Reformatting tests.
This commit is contained in:
mark_story 2009-03-08 01:01:08 -05:00
parent 3e0d645957
commit 6213b83f8d
2 changed files with 15 additions and 41 deletions

View file

@ -118,11 +118,6 @@ class JsHelper extends AppHelper {
* @var array
*/
var $__objects = array();
var $effectMap = array(
'Appear', 'Fade', 'Puff', 'BlindDown', 'BlindUp', 'SwitchOff', 'SlideDown', 'SlideUp',
'DropOut', 'Shake', 'Pulsate', 'Squish', 'Fold', 'Grow', 'Shrink', 'Highlight', 'toggle'
);
/**
* output
*
@ -244,34 +239,6 @@ class JsHelper extends AppHelper {
$view->addScript($out);
}
}
function if_($if, $then, $else = null, $elseIf = array()) {
$len = strlen($if) - 1;
if ($if{$len} == ';') {
$if{$len} = null;
}
$out = 'if (' . $if . ') { ' . $then . ' }';
foreach ($elseIf as $cond => $exec) {
//$out .=
}
if (!empty($else)) {
$out .= ' else { ' . $else . ' }';
}
return $out;
}
/*
* Tries a series of expressions, and executes after first successful completion.
* (See Prototype's Try.these).
*
* @return string
*/
function tryThese_($expr1, $expr2, $expr3) {
}
/**
* Loads a remote URL
*
@ -280,7 +247,6 @@ class JsHelper extends AppHelper {
* @return string
*/
function load_($url = null, $options = array()) {
if (isset($options['update'])) {
if (!is_array($options['update'])) {
$func = "new Ajax.Updater('{$options['update']}',";
@ -339,7 +305,6 @@ class JsHelper extends AppHelper {
return $this->__objects[$name];
}
}
/**

View file

@ -333,12 +333,21 @@ class JsBaseEngineTestCase extends CakeTestCase {
$result = $this->JsEngine->object(array(
'2007' => array(
'Spring' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')),
'Fall' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky'))
), '2006' => array(
'Spring' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')),
'Fall' => array('1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
))
'Spring' => array(
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
),
'Fall' => array(
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
)
),
'2006' => array(
'Spring' => array(
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
),
'Fall' => array(
'1' => array('id' => 1, 'name' => 'Josh'), '2' => array('id' => 2, 'name' => 'Becky')
)
)
));
$expected = '{"2007":{"Spring":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}},"Fall":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}}},"2006":{"Spring":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}},"Fall":{"1":{"id":1,"name":"Josh"},"2":{"id":2,"name":"Becky"}}}}';
$this->assertEqual($result, $expected);