mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Added tests to ticket #959
This commit is contained in:
parent
f2f2987743
commit
72bb229a9c
1 changed files with 34 additions and 0 deletions
|
@ -517,6 +517,40 @@ class RssHelperTest extends CakeTestCase {
|
|||
'/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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue