mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding sort() to option parsing, makes testing easier.
This commit is contained in:
parent
9708b2dc50
commit
29b3a96cb2
2 changed files with 3 additions and 2 deletions
|
@ -624,6 +624,7 @@ class JsBaseEngineHelper extends AppHelper {
|
|||
}
|
||||
$out[] = $key . ':' . $value;
|
||||
}
|
||||
sort($out);
|
||||
return join(', ', $out);
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -361,11 +361,11 @@ class JsBaseEngineTestCase extends CakeTestCase {
|
|||
$JsEngine = new OptionEngineHelper();
|
||||
|
||||
$result = $JsEngine->testParseOptions(array('url' => '/posts/view/1', 'key' => 1));
|
||||
$expected = 'url:"/posts/view/1", key:1';
|
||||
$expected = 'key:1, url:"/posts/view/1"';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$result = $JsEngine->testParseOptions(array('url' => '/posts/view/1', 'success' => 'doSuccess'), array('success'));
|
||||
$expected = 'url:"/posts/view/1", success:doSuccess';
|
||||
$expected = 'success:doSuccess, url:"/posts/view/1"';
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue