summaryrefslogtreecommitdiffstats
path: root/core/profiles/standard/src/Tests/StandardTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/profiles/standard/src/Tests/StandardTest.php')
-rw-r--r--core/profiles/standard/src/Tests/StandardTest.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/core/profiles/standard/src/Tests/StandardTest.php b/core/profiles/standard/src/Tests/StandardTest.php
index 9857b83..3a1eead 100644
--- a/core/profiles/standard/src/Tests/StandardTest.php
+++ b/core/profiles/standard/src/Tests/StandardTest.php
@@ -7,6 +7,7 @@
namespace Drupal\standard\Tests;
+use Drupal\comment\Entity\Comment;
use Drupal\simpletest\WebTestBase;
/**
@@ -34,7 +35,11 @@ class StandardTest extends WebTestBase {
$this->assertResponse(200);
// Test anonymous user can access 'Main navigation' block.
- $admin = $this->drupalCreateUser(array('administer blocks'));
+ $admin = $this->drupalCreateUser(array(
+ 'administer blocks',
+ 'post comments',
+ 'skip comment approval',
+ ));
$this->drupalLogin($admin);
// Configure the block.
$this->drupalGet('admin/structure/block/add/system_menu_block:main/bartik');
@@ -67,6 +72,26 @@ class StandardTest extends WebTestBase {
$this->drupalLogout();
$this->assertText('Main navigation');
+ // Ensure comments don't show in the front page RSS feed.
+ // Create an article.
+ $node = $this->drupalCreateNode(array(
+ 'type' => 'article',
+ 'title' => 'Foobar',
+ 'promote' => 1,
+ 'status' => 1,
+ ));
+
+ // Add a comment.
+ $this->drupalLogin($admin);
+ $this->drupalGet('node/1');
+ $this->drupalPostForm(NULL, array(
+ 'subject' => 'Barfoo',
+ 'comment_body[0][value]' => 'Then she picked out two somebodies, Sally and me',
+ ), t('Save'));
+ // Fetch the feed.
+ $this->drupalGet('rss.xml');
+ $this->assertText('Foobar');
+ $this->assertNoText('Then she picked out two somebodies, Sally and me');
}
}