Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit d166b4f

Browse files
committed
Unit test for category elements in RSS feed having CDATA section
1 parent 0dc530d commit d166b4f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/Zend/Feed/Writer/Renderer/Entry/RssTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,4 +367,17 @@ public function testCategoriesCharDataEncoding()
367367
$this->assertEquals($expected, (array) $entry->getCategories());
368368
}
369369

370+
/**
371+
* @group GH-461
372+
*/
373+
public function testCategoryHasCDataSection()
374+
{
375+
$this->_validEntry->addCategory(array(
376+
'term' => 'This is a test category',
377+
));
378+
$renderer = new Zend_Feed_Writer_Renderer_Feed_Rss($this->_validWriter);
379+
$xmlString = $renderer->render()->saveXml();
380+
$this->assertContains('<category><![CDATA[This is a test category]]></category>', $xmlString);
381+
}
382+
370383
}

0 commit comments

Comments
 (0)