Permalink
Showing
with
34 additions
and
0 deletions.
-
+34
−0
cake/tests/cases/libs/view/helpers/rss.test.php
|
@@ -514,6 +514,40 @@ function testItem() { |
|
|
'/item'
|
|
|
);
|
|
|
$this->assertTags($result, $expected);
|
|
|
+
|
|
|
+ $item = array(
|
|
|
+ 'title' => 'Foo bar',
|
|
|
+ 'link' => array(
|
|
|
+ 'url' => 'http://example.com/foo?a=1&b=2',
|
|
|
+ 'convertEntities' => false
|
|
|
+ ),
|
|
|
+ 'description' => array(
|
|
|
+ 'value' => 'descriptive words',
|
|
|
+ 'cdata' => true,
|
|
|
+ ),
|
|
|
+ 'pubDate' => '2008-05-31 12:00:00'
|
|
|
+ );
|
|
|
+ $result = $this->Rss->item(null, $item);
|
|
|
+ $expected = array(
|
|
|
+ '<item',
|
|
|
+ '<title',
|
|
|
+ 'Foo bar',
|
|
|
+ '/title',
|
|
|
+ '<link',
|
|
|
+ 'http://example.com/foo?a=1&b=2',
|
|
|
+ '/link',
|
|
|
+ '<description',
|
|
|
+ '<![CDATA[descriptive words]]',
|
|
|
+ '/description',
|
|
|
+ '<pubDate',
|
|
|
+ date('r', strtotime('2008-05-31 12:00:00')),
|
|
|
+ '/pubDate',
|
|
|
+ '<guid',
|
|
|
+ 'http://example.com/foo?a=1&b=2',
|
|
|
+ '/guid',
|
|
|
+ '/item'
|
|
|
+ );
|
|
|
+ $this->assertTags($result, $expected);
|
|
|
}
|
|
|
/**
|
|
|
* testTime method
|
|
|
0 comments on commit
aee6458