343b797cf5ccee1b2cd7c5f64e947c004577f30d
[yaffs-website] / web / core / modules / comment / src / Tests / Views / RowRssTest.php
1 <?php
2
3 namespace Drupal\comment\Tests\Views;
4
5 /**
6  * Tests the comment rss row plugin.
7  *
8  * @group comment
9  * @see \Drupal\comment\Plugin\views\row\Rss
10  */
11 class RowRssTest extends CommentTestBase {
12
13   /**
14    * Views used by this test.
15    *
16    * @var array
17    */
18   public static $testViews = ['test_comment_rss'];
19
20   /**
21    * Test comment rss output.
22    */
23   public function testRssRow() {
24     $this->drupalGet('test-comment-rss');
25
26     $result = $this->xpath('//item');
27     $this->assertEqual(count($result), 1, 'Just one comment was found in the rss output.');
28
29     $this->assertEqual($result[0]->pubdate, gmdate('r', $this->comment->getCreatedTime()), 'The right pubDate appears in the rss output.');
30   }
31
32 }