3 namespace Drupal\Tests\comment\Functional\Views;
6 * Tests the comment rss row plugin.
9 * @see \Drupal\comment\Plugin\views\row\Rss
11 class RowRssTest extends CommentTestBase {
14 * Views used by this test.
18 public static $testViews = ['test_comment_rss'];
21 * Test comment rss output.
23 public function testRssRow() {
24 $this->drupalGet('test-comment-rss');
26 // Because the response is XML we can't use the page which depends on an
27 // HTML tag being present.
28 $result = $this->getSession()->getDriver()->find('//item');
29 $this->assertEqual(count($result), 1, 'Just one comment was found in the rss output.');
31 $this->assertEqual($result[0]->find('xpath', '//pubDate')->getHtml(), gmdate('r', $this->comment->getCreatedTime()), 'The right pubDate appears in the rss output.');