2008-05-30 11:40:08 +00:00
|
|
|
<?php
|
|
|
|
/* SVN FILE: $Id$ */
|
|
|
|
/**
|
|
|
|
* Short description for file.
|
|
|
|
*
|
|
|
|
* Long description for file
|
|
|
|
*
|
|
|
|
* PHP versions 4 and 5
|
|
|
|
*
|
|
|
|
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
2008-10-30 17:30:26 +00:00
|
|
|
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
2008-05-30 11:40:08 +00:00
|
|
|
*
|
|
|
|
* Licensed under The Open Group Test Suite License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
|
|
|
* @filesource
|
2008-10-30 17:30:26 +00:00
|
|
|
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
|
|
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
|
|
|
* @package cake.tests
|
|
|
|
* @subpackage cake.tests.cases.libs.view.helpers
|
|
|
|
* @since CakePHP(tm) v 1.2.0.4206
|
|
|
|
* @version $Revision$
|
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
2008-05-30 11:40:08 +00:00
|
|
|
*/
|
|
|
|
App::import('Helper', array('Rss', 'Time'));
|
|
|
|
/**
|
|
|
|
* Short description for class.
|
|
|
|
*
|
2008-10-30 17:30:26 +00:00
|
|
|
* @package cake.tests
|
|
|
|
* @subpackage cake.tests.cases.libs.view.helpers
|
2008-05-30 11:40:08 +00:00
|
|
|
*/
|
|
|
|
class RssTest extends CakeTestCase {
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* setUp method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function setUp() {
|
|
|
|
$this->Rss =& new RssHelper();
|
2008-06-03 22:33:21 +00:00
|
|
|
$this->Rss->Time =& new TimeHelper();
|
|
|
|
$this->Rss->beforeRender();
|
2008-11-08 02:58:37 +00:00
|
|
|
|
2008-08-26 23:15:48 +00:00
|
|
|
$manager =& XmlManager::getInstance();
|
|
|
|
$manager->namespaces = array();
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* tearDown method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function tearDown() {
|
|
|
|
unset($this->Rss);
|
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testAddNamespace method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-11-08 02:58:37 +00:00
|
|
|
function testAddNamespace() {
|
2008-06-03 22:33:21 +00:00
|
|
|
$this->Rss->addNs('custom', 'http://example.com/dtd.xml');
|
|
|
|
$manager =& XmlManager::getInstance();
|
|
|
|
|
|
|
|
$expected = array('custom' => 'http://example.com/dtd.xml');
|
|
|
|
$this->assertEqual($manager->namespaces, $expected);
|
2008-06-21 15:23:58 +00:00
|
|
|
|
|
|
|
$this->Rss->removeNs('custom');
|
|
|
|
|
|
|
|
$this->Rss->addNs('dummy', 'http://dummy.com/1.0/');
|
2008-08-05 03:24:18 +00:00
|
|
|
$result = $this->Rss->document();
|
|
|
|
$expected = array(
|
|
|
|
'rss' => array(
|
|
|
|
'xmlns:dummy' => 'http://dummy.com/1.0/',
|
|
|
|
'version' => '2.0'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-06-21 15:23:58 +00:00
|
|
|
|
|
|
|
$this->Rss->removeNs('dummy');
|
2008-06-03 22:33:21 +00:00
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testRemoveNamespace method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-06-03 22:33:21 +00:00
|
|
|
function testRemoveNamespace() {
|
|
|
|
$this->Rss->addNs('custom', 'http://example.com/dtd.xml');
|
|
|
|
$this->Rss->addNs('custom2', 'http://example.com/dtd2.xml');
|
|
|
|
$manager =& XmlManager::getInstance();
|
|
|
|
|
|
|
|
$expected = array('custom' => 'http://example.com/dtd.xml', 'custom2' => 'http://example.com/dtd2.xml');
|
|
|
|
$this->assertEqual($manager->namespaces, $expected);
|
|
|
|
|
|
|
|
$this->Rss->removeNs('custom');
|
|
|
|
$expected = array('custom2' => 'http://example.com/dtd2.xml');
|
|
|
|
$this->assertEqual($manager->namespaces, $expected);
|
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testDocument method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testDocument() {
|
2008-08-05 03:24:18 +00:00
|
|
|
$result = $this->Rss->document();
|
|
|
|
$expected = array(
|
|
|
|
'rss' => array(
|
|
|
|
'version' => '2.0'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
|
2008-08-05 03:24:18 +00:00
|
|
|
$result = $this->Rss->document(array('contrived' => 'parameter'));
|
|
|
|
$expected = array(
|
|
|
|
'rss' => array(
|
|
|
|
'version' => '2.0'
|
|
|
|
),
|
|
|
|
'<parameter'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
|
2008-08-05 03:24:18 +00:00
|
|
|
$result = $this->Rss->document(null, 'content');
|
|
|
|
$expected = array(
|
|
|
|
'rss' => array(
|
|
|
|
'version' => '2.0'
|
|
|
|
),
|
|
|
|
'content'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
|
2008-08-05 03:24:18 +00:00
|
|
|
$result = $this->Rss->document(array('contrived' => 'parameter'), 'content');
|
|
|
|
$expected = array(
|
|
|
|
'rss' => array(
|
|
|
|
'contrived' => 'parameter',
|
|
|
|
'version' => '2.0'
|
|
|
|
),
|
|
|
|
'content'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testChannel method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testChannel() {
|
|
|
|
$attrib = array('a' => '1', 'b' => '2');
|
2008-08-05 03:24:18 +00:00
|
|
|
$elements = array('title' => 'title');
|
2008-05-30 11:40:08 +00:00
|
|
|
$content = 'content';
|
2008-08-05 03:24:18 +00:00
|
|
|
|
|
|
|
$result = $this->Rss->channel($attrib, $elements, $content);
|
|
|
|
$expected = array(
|
|
|
|
'channel' => array(
|
|
|
|
'a' => '1',
|
|
|
|
'b' => '2'
|
|
|
|
),
|
|
|
|
'<title',
|
|
|
|
'title',
|
|
|
|
'/title',
|
|
|
|
'<link',
|
|
|
|
RssHelper::url('/', true),
|
|
|
|
'/link',
|
|
|
|
'<description',
|
|
|
|
'content',
|
|
|
|
'/channel'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testChannelElementLevelAttrib method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testChannelElementLevelAttrib() {
|
|
|
|
$attrib = array();
|
2008-08-05 03:24:18 +00:00
|
|
|
$elements = array(
|
|
|
|
'title' => 'title',
|
|
|
|
'image' => array(
|
|
|
|
'myImage',
|
|
|
|
'attrib' => array(
|
|
|
|
'href' => 'http://localhost'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
2008-05-30 11:40:08 +00:00
|
|
|
$content = 'content';
|
2008-08-05 03:24:18 +00:00
|
|
|
|
|
|
|
$result = $this->Rss->channel($attrib, $elements, $content);
|
|
|
|
$expected = array(
|
|
|
|
'<channel',
|
|
|
|
'<title',
|
|
|
|
'title',
|
|
|
|
'/title',
|
|
|
|
'image' => array(
|
|
|
|
'href' => 'http://localhost'
|
|
|
|
),
|
|
|
|
'<myImage',
|
|
|
|
'/image',
|
|
|
|
'<link',
|
|
|
|
RssHelper::url('/', true),
|
|
|
|
'/link',
|
|
|
|
'<description',
|
|
|
|
'content',
|
|
|
|
'/channel'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testItems method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testItems() {
|
|
|
|
$items = array(
|
|
|
|
array('title' => 'title1', 'guid' => 'http://www.example.com/guid1', 'link' => 'http://www.example.com/link1', 'description' => 'description1'),
|
|
|
|
array('title' => 'title2', 'guid' => 'http://www.example.com/guid2', 'link' => 'http://www.example.com/link2', 'description' => 'description2'),
|
|
|
|
array('title' => 'title3', 'guid' => 'http://www.example.com/guid3', 'link' => 'http://www.example.com/link3', 'description' => 'description3')
|
|
|
|
);
|
|
|
|
|
|
|
|
$result = $this->Rss->items($items);
|
2008-08-05 03:24:18 +00:00
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'<title', 'title1', '/title',
|
|
|
|
'<guid', 'http://www.example.com/guid1', '/guid',
|
|
|
|
'<link', 'http://www.example.com/link1', '/link',
|
|
|
|
'<description', 'description1', '/description',
|
|
|
|
'/item',
|
|
|
|
'<item',
|
|
|
|
'<title', 'title2', '/title',
|
|
|
|
'<guid', 'http://www.example.com/guid2', '/guid',
|
|
|
|
'<link', 'http://www.example.com/link2', '/link',
|
|
|
|
'<description', 'description2', '/description',
|
|
|
|
'/item',
|
|
|
|
'<item',
|
|
|
|
'<title', 'title3', '/title',
|
|
|
|
'<guid', 'http://www.example.com/guid3', '/guid',
|
|
|
|
'<link', 'http://www.example.com/link3', '/link',
|
|
|
|
'<description', 'description3', '/description',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
|
|
|
|
$result = $this->Rss->items(array());
|
2008-08-05 03:24:18 +00:00
|
|
|
$expected = '';
|
|
|
|
$this->assertEqual($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
2008-11-08 02:58:37 +00:00
|
|
|
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testItem method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testItem() {
|
2008-08-05 03:24:18 +00:00
|
|
|
$item = array(
|
|
|
|
'title' => 'My title',
|
|
|
|
'description' => 'My description',
|
|
|
|
'link' => 'http://www.google.com/'
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'<title',
|
|
|
|
'My title',
|
|
|
|
'/title',
|
|
|
|
'<description',
|
|
|
|
'My description',
|
|
|
|
'/description',
|
|
|
|
'<link',
|
|
|
|
'http://www.google.com/',
|
|
|
|
'/link',
|
|
|
|
'<guid',
|
|
|
|
'http://www.google.com/',
|
|
|
|
'/guid',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-06-21 15:23:58 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$item = array(
|
|
|
|
'title' => array(
|
|
|
|
'value' => 'My Title',
|
|
|
|
'cdata' => true,
|
|
|
|
),
|
|
|
|
'link' => 'http://www.example.com/1',
|
|
|
|
'description' => array(
|
|
|
|
'value' => 'descriptive words',
|
|
|
|
'cdata' => true,
|
2008-06-20 20:17:23 +00:00
|
|
|
),
|
2008-05-30 11:40:08 +00:00
|
|
|
'pubDate' => '2008-05-31 12:00:00',
|
|
|
|
'guid' => 'http://www.example.com/1'
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'<title',
|
|
|
|
'<![CDATA[My Title]]',
|
|
|
|
'/title',
|
|
|
|
'<link',
|
|
|
|
'http://www.example.com/1',
|
|
|
|
'/link',
|
|
|
|
'<description',
|
|
|
|
'<![CDATA[descriptive words]]',
|
|
|
|
'/description',
|
|
|
|
'<pubDate',
|
2008-06-08 15:44:46 +00:00
|
|
|
'Sat, 31 May 2008 12:00:00 ' . date('O'),
|
2008-05-30 11:40:08 +00:00
|
|
|
'/pubDate',
|
|
|
|
'<guid',
|
|
|
|
'http://www.example.com/1',
|
|
|
|
'/guid',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-06-21 15:23:58 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$item = array(
|
|
|
|
'title' => array(
|
|
|
|
'value' => 'My Title & more',
|
|
|
|
'cdata' => true
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'<title',
|
|
|
|
'<![CDATA[My Title & more]]',
|
|
|
|
'/title',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-06-21 15:23:58 +00:00
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
$item = array(
|
|
|
|
'title' => array(
|
|
|
|
'value' => 'My Title & more',
|
2008-06-11 02:10:32 +00:00
|
|
|
'convertEntities' => false
|
2008-05-30 11:40:08 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'<title',
|
|
|
|
'My Title & more',
|
|
|
|
'/title',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-06-21 15:23:58 +00:00
|
|
|
|
2008-06-11 02:10:32 +00:00
|
|
|
$item = array(
|
|
|
|
'title' => array(
|
|
|
|
'value' => 'My Title & more',
|
|
|
|
'cdata' => true,
|
|
|
|
'convertEntities' => false,
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'<title',
|
|
|
|
'<![CDATA[My Title & more]]',
|
|
|
|
'/title',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-08-05 03:24:18 +00:00
|
|
|
|
|
|
|
$item = array(
|
|
|
|
'category' => array(
|
|
|
|
'value' => 'CakePHP',
|
|
|
|
'cdata' => true,
|
|
|
|
'domain' => 'http://www.cakephp.org'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'category' => array('domain' => 'http://www.cakephp.org'),
|
|
|
|
'<![CDATA[CakePHP]]',
|
|
|
|
'/category',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
|
|
|
|
|
|
|
$item = array(
|
|
|
|
'category' => array(
|
|
|
|
array(
|
|
|
|
'value' => 'CakePHP',
|
|
|
|
'cdata' => true,
|
|
|
|
'domain' => 'http://www.cakephp.org'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'value' => 'Bakery',
|
|
|
|
'cdata' => true
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'category' => array('domain' => 'http://www.cakephp.org'),
|
|
|
|
'<![CDATA[CakePHP]]',
|
|
|
|
'/category',
|
|
|
|
'<category',
|
|
|
|
'<![CDATA[Bakery]]',
|
|
|
|
'/category',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-11-08 02:58:37 +00:00
|
|
|
|
2008-08-08 03:49:53 +00:00
|
|
|
$item = array(
|
|
|
|
'title' => array(
|
|
|
|
'value' => 'My Title',
|
|
|
|
'cdata' => true,
|
|
|
|
),
|
|
|
|
'link' => 'http://www.example.com/1',
|
|
|
|
'description' => array(
|
|
|
|
'value' => 'descriptive words',
|
|
|
|
'cdata' => true,
|
|
|
|
),
|
|
|
|
'enclosure' => array(
|
|
|
|
'url' => '/test.flv'
|
|
|
|
),
|
|
|
|
'pubDate' => '2008-05-31 12:00:00',
|
|
|
|
'guid' => 'http://www.example.com/1',
|
|
|
|
'category' => array(
|
|
|
|
array(
|
|
|
|
'value' => 'CakePHP',
|
|
|
|
'cdata' => true,
|
|
|
|
'domain' => 'http://www.cakephp.org'
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'value' => 'Bakery',
|
|
|
|
'cdata' => true
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
$result = $this->Rss->item(null, $item);
|
|
|
|
$expected = array(
|
|
|
|
'<item',
|
|
|
|
'<title',
|
|
|
|
'<![CDATA[My Title]]',
|
|
|
|
'/title',
|
|
|
|
'<link',
|
|
|
|
'http://www.example.com/1',
|
|
|
|
'/link',
|
|
|
|
'<description',
|
|
|
|
'<![CDATA[descriptive words]]',
|
|
|
|
'/description',
|
|
|
|
'enclosure' => array('url' => RssHelper::url('/test.flv', true)),
|
|
|
|
'<pubDate',
|
|
|
|
'Sat, 31 May 2008 12:00:00 ' . date('O'),
|
|
|
|
'/pubDate',
|
|
|
|
'<guid',
|
|
|
|
'http://www.example.com/1',
|
|
|
|
'/guid',
|
|
|
|
'category' => array('domain' => 'http://www.cakephp.org'),
|
|
|
|
'<![CDATA[CakePHP]]',
|
|
|
|
'/category',
|
|
|
|
'<category',
|
|
|
|
'<![CDATA[Bakery]]',
|
|
|
|
'/category',
|
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testTime method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testTime() {
|
|
|
|
}
|
2008-06-05 15:20:45 +00:00
|
|
|
/**
|
|
|
|
* testElementAttrNotInParent method
|
2008-06-21 15:23:58 +00:00
|
|
|
*
|
2008-06-05 15:20:45 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function testElementAttrNotInParent() {
|
2008-08-05 03:24:18 +00:00
|
|
|
$attributes = array(
|
|
|
|
'title' => 'Some Title',
|
|
|
|
'link' => 'http://link.com',
|
|
|
|
'description' => 'description'
|
|
|
|
);
|
2008-05-30 11:40:08 +00:00
|
|
|
$elements = array('enclosure' => array('url' => 'http://test.com'));
|
|
|
|
|
|
|
|
$result = $this->Rss->item($attributes, $elements);
|
|
|
|
$expected = array(
|
2008-08-05 03:24:18 +00:00
|
|
|
'item' => array(
|
|
|
|
'title' => 'Some Title',
|
|
|
|
'link' => 'http://link.com',
|
|
|
|
'description' => 'description'
|
|
|
|
),
|
|
|
|
'enclosure' => array(
|
|
|
|
'url' => 'http://test.com'
|
|
|
|
),
|
2008-05-30 11:40:08 +00:00
|
|
|
'/item'
|
|
|
|
);
|
|
|
|
$this->assertTags($result, $expected);
|
|
|
|
}
|
|
|
|
}
|
2008-06-21 15:23:58 +00:00
|
|
|
?>
|