From af8c5716fc9172accbcbfe48f14eb57527680648 Mon Sep 17 00:00:00 2001 From: Schlaefer Date: Mon, 30 Jul 2012 10:09:47 +0200 Subject: [PATCH] Added test for RSS to allow namespace tags if namespace is specified If a namespace prefix is defined it's prefix should not be stripped from the tag: `` stays ``. Other prefixes are still stripped from the tag name. This test is missing in 19f0e72d582fba29ade83b11000ba03e0e697f7f --- lib/Cake/Test/Case/View/Helper/RssHelperTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php index 1e69da066..34e99576d 100644 --- a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php @@ -742,7 +742,8 @@ class RssHelperTest extends CakeTestCase { public function testElementNamespaceWithPrefix() { $item = array( 'title' => 'Title', - 'creator' => 'Alex' + 'dc:creator' => 'Alex', + 'xy:description' => 'descriptive words' ); $attributes = array( 'namespace' => array( @@ -760,11 +761,16 @@ class RssHelperTest extends CakeTestCase { ), 'Title', '/title', - 'creator' => array( + 'dc:creator' => array( 'xmlns:dc' => 'http://link.com' ), 'Alex', - '/creator', + '/dc:creator', + 'description' => array( + 'xmlns:dc' => 'http://link.com' + ), + 'descriptive words', + '/description', '/item' ); $this->assertTags($result, $expected, true);