RowRssTest.php in Drupal 9
File
core/modules/comment/tests/src/Functional/Views/RowRssTest.php
View source
<?php
namespace Drupal\Tests\comment\Functional\Views;
class RowRssTest extends CommentTestBase {
protected $defaultTheme = 'stark';
public static $testViews = [
'test_comment_rss',
];
public function testRssRow() {
$this
->drupalGet('test-comment-rss');
$result = $this
->getSession()
->getDriver()
->find('//item');
$this
->assertCount(1, $result, 'Just one comment was found in the rss output.');
$this
->assertEquals(gmdate('r', $this->comment
->getCreatedTime()), $result[0]
->find('xpath', '//pubDate')
->getHtml(), 'The right pubDate appears in the rss output.');
}
}