Add failing test for #2188

This commit is contained in:
mark_story 2011-11-25 21:19:31 -05:00
parent 73674c648c
commit 54aef7216f

View file

@ -867,4 +867,19 @@ class XmlTest extends CakeTestCase {
$this->assertEquals(str_replace(array("\r", "\n"), '', $obj->asXML()), $expected);
}
/**
* Test ampersand in text elements.
*
* @return void
*/
public function testAmpInText() {
$data = array(
'outer' => array(
'inner' => array('name' => 'mark & mark')
)
);
$obj = Xml::build($data);
$result = $obj->asXml();
$this->assertContains('mark & mark', $result);
}
}