Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add failing test for #2188

  • Loading branch information...
commit 54aef7216f8daca839df4ad6a530bb4a76b3b937 1 parent 73674c6
Mark Story markstory authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/Cake/Test/Case/Utility/XmlTest.php
15 lib/Cake/Test/Case/Utility/XmlTest.php
View
@@ -867,4 +867,19 @@ public function testWithModel() {
$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);
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.