mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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: `<dc:creator>` stays `<dc:creator>`.
Other prefixes are still stripped from the tag name.
This test is missing in 19f0e72d58
This commit is contained in:
parent
4541510e26
commit
af8c5716fc
1 changed files with 9 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue