mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Correct brackets.
This commit is contained in:
parent
ed21f84236
commit
cdbf5a0dec
1 changed files with 26 additions and 26 deletions
|
@ -106,28 +106,28 @@ class XmlViewTest extends CakeTestCase {
|
|||
$Request = new CakeRequest();
|
||||
$Response = new CakeResponse();
|
||||
$Controller = new Controller($Request, $Response);
|
||||
$data = [
|
||||
'_serialize' => ['tags'],
|
||||
'_xmlOptions' => ['format' => 'attributes'],
|
||||
'tags' => [
|
||||
'tag' => [
|
||||
[
|
||||
$data = array(
|
||||
'_serialize' => array('tags'),
|
||||
'_xmlOptions' => array('format' => 'attributes'),
|
||||
'tags' => array(
|
||||
'tag' => array(
|
||||
array(
|
||||
'id' => '1',
|
||||
'name' => 'defect'
|
||||
],
|
||||
[
|
||||
),
|
||||
array(
|
||||
'id' => '2',
|
||||
'name' => 'enhancement'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
$Controller->set($data);
|
||||
$Controller->viewClass = 'Xml';
|
||||
$View = new XmlView($Controller);
|
||||
$result = $View->render();
|
||||
|
||||
$expected = Xml::build(['response' => ['tags' => $data['tags']]], $data['_xmlOptions'])->asXML();
|
||||
$expected = Xml::build(array('response' => array('tags' => $data['tags'])), $data['_xmlOptions'])->asXML();
|
||||
$this->assertSame($expected, $result);
|
||||
}
|
||||
|
||||
|
@ -140,24 +140,24 @@ class XmlViewTest extends CakeTestCase {
|
|||
$Request = new CakeRequest();
|
||||
$Response = new CakeResponse();
|
||||
$Controller = new Controller($Request, $Response);
|
||||
$data = [
|
||||
$data = array(
|
||||
'_serialize' => 'tags',
|
||||
'_xmlOptions' => ['format' => 'attributes'],
|
||||
'tags' => [
|
||||
'tags' => [
|
||||
'tag' => [
|
||||
[
|
||||
'_xmlOptions' => array('format' => 'attributes'),
|
||||
'tags' => array(
|
||||
'tags' => array(
|
||||
'tag' => array(
|
||||
array(
|
||||
'id' => '1',
|
||||
'name' => 'defect'
|
||||
],
|
||||
[
|
||||
),
|
||||
array(
|
||||
'id' => '2',
|
||||
'name' => 'enhancement'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
$Controller->set($data);
|
||||
$Controller->viewClass = 'Xml';
|
||||
$View = new XmlView($Controller);
|
||||
|
|
Loading…
Reference in a new issue