Skip to content
Permalink
Browse files

Removing methods that are being/moved removed.

Reformatting tests.
  • Loading branch information...
markstory committed Mar 8, 2009
1 parent 3e0d645 commit 6213b83f8d26c2bcc87b09043560245244a1e728
Showing with 15 additions and 41 deletions.
  1. +0 −35 cake/libs/view/helpers/js.php
  2. +15 −6 cake/tests/cases/libs/view/helpers/js.test.php
@@ -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 @@ function uses($url, $inline = true, $once = true) {
$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 @@ function tryThese_($expr1, $expr2, $expr3) {
* @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 @@ function __object($name, $var) {
return $this->__objects[$name];
}
}
/**
@@ -333,12 +333,21 @@ function testObject() {
$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);

0 comments on commit 6213b83

Please sign in to comment.
You can’t perform that action at this time.