diff --git a/cake/tests/cases/libs/view/helpers/js.test.php b/cake/tests/cases/libs/view/helpers/js.test.php index 30b768e1a..9c554123e 100644 --- a/cake/tests/cases/libs/view/helpers/js.test.php +++ b/cake/tests/cases/libs/view/helpers/js.test.php @@ -413,9 +413,17 @@ class JsBaseEngineTestCase extends CakeTestCase { $data['mystring'] = "a \"double-quoted\" string"; $this->assertEqual(json_encode($data), $this->JsEngine->object($data)); - + $data['mystring'] = 'a \\"double-quoted\\" string'; $this->assertEqual(json_encode($data), $this->JsEngine->object($data)); + + unset($data['mystring']); + $data[3] = array(1, 2, 3); + $this->assertEqual(json_encode($data), $this->JsEngine->object($data)); + + unset($data[3]); + $data = array('mystring' => null, 'bool' => false, 'array' => array(1, 44, 66)); + $this->assertEqual(json_encode($data), $this->JsEngine->object($data)); } /** * test that JSON made with JsBaseEngineHelper::object() against json_decode()