Skip to content
Permalink
Browse files

Fix PHPCS error and update test.

Refs #7899
  • Loading branch information...
markstory committed Jan 4, 2016
1 parent f187531 commit 13a762527908c4a6604c45ec728c6f815a590d57
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/View/XmlView.php
  2. +2 −2 tests/TestCase/View/XmlViewTest.php
@@ -141,7 +141,7 @@ protected function _serialize($serialize)
$options['pretty'] = true;
}
if(isset($options['return']) && strtolower($options['return']) === 'domdocument') {
if (isset($options['return']) && strtolower($options['return']) === 'domdocument') {
return Xml::fromArray($data, $options)->saveXML();
}
return Xml::fromArray($data, $options)->asXML();
@@ -119,7 +119,7 @@ public function testRenderSerializeWithOptions()
$Controller = new Controller($Request, $Response);
$data = [
'_serialize' => ['tags', 'nope'],
'_xmlOptions' => ['format' => 'attributes'],
'_xmlOptions' => ['format' => 'attributes', 'return' => 'domdocument'],
'tags' => [
'tag' => [
[
@@ -138,7 +138,7 @@ public function testRenderSerializeWithOptions()
$View = $Controller->createView();
$result = $View->render();
$expected = Xml::build(['response' => ['tags' => $data['tags']]], $data['_xmlOptions'])->asXML();
$expected = Xml::build(['response' => ['tags' => $data['tags']]], $data['_xmlOptions'])->saveXML();
$this->assertSame($expected, $result);
}

0 comments on commit 13a7625

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