Skip to content
This repository was archived by the owner on May 16, 2018. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Unit test for category elements in RSS feed having CDATA section
  • Loading branch information
Nazin committed Dec 3, 2014
commit d166b4fbdbb6eaab68898ff420143dea595a0565
13 changes: 13 additions & 0 deletions tests/Zend/Feed/Writer/Renderer/Entry/RssTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,17 @@ public function testCategoriesCharDataEncoding()
$this->assertEquals($expected, (array) $entry->getCategories());
}

/**
* @group GH-461
*/
public function testCategoryHasCDataSection()
{
$this->_validEntry->addCategory(array(
'term' => 'This is a test category',
));
$renderer = new Zend_Feed_Writer_Renderer_Feed_Rss($this->_validWriter);
$xmlString = $renderer->render()->saveXml();
$this->assertContains('<category><![CDATA[This is a test category]]></category>', $xmlString);
}

}