mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding additional tests for object() encoding.
This commit is contained in:
parent
69de1291e1
commit
4d4bc9040e
1 changed files with 9 additions and 1 deletions
|
@ -416,6 +416,14 @@ class JsBaseEngineTestCase extends CakeTestCase {
|
|||
|
||||
$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()
|
||||
|
|
Loading…
Reference in a new issue