diff options
Diffstat (limited to 'modules/node/node.test')
-rw-r--r-- | modules/node/node.test | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/node/node.test b/modules/node/node.test index 016ce5619..3c4a74040 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -1048,3 +1048,27 @@ class NodeTitleTestCase extends DrupalWebTestCase { $this->assertEqual(current($this->xpath($xpath)), $node->title[FIELD_LANGUAGE_NONE][0]['value'], 'Node preview title is equal to node title.', 'Node'); } } + +/** + * Test the node_feed() functionality + */ +class NodeFeedTestCase extends DrupalWebTestCase { + public static function getInfo() { + return array( + 'name' => 'Node feed', + 'description' => 'Ensures that node_feed() functions correctly.', + 'group' => 'Node', + ); + } + + /** + * Ensure that node_feed accepts and prints extra channel elements. + */ + function testNodeFeedExtraChannelElements() { + ob_start(); + node_feed(array(), array('copyright' => 'Drupal is a registered trademark of Dries Buytaert.')); + $output = ob_get_clean(); + + $this->assertTrue(strpos($output, '<copyright>Drupal is a registered trademark of Dries Buytaert.</copyright>') !== FALSE); + } +} |