diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumAnonymousTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumAnonymousTest.php
new file mode 100644
index 0000000..b0f7eaf
--- /dev/null
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumAnonymousTest.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\forum\Tests\ForumAnonymousTest.
+ */
+
+namespace Drupal\forum\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests anonymous user messages.
+ */
+class ForumAnonymousTest extends WebTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Forum anonymous',
+      'description' => 'Tests anonymous user messages.',
+      'group' => 'Forum',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('taxonomy', 'comment', 'forum');
+
+    // Create a test user.
+    $web_user = $this->drupalCreateUser(array('create forum content', 'edit own forum content', 'edit any forum content', 'administer nodes'));
+    $this->drupalLogin($web_user);
+  }
+
+  /**
+   * Tests the presence of the message "Log in to post new content in the forum"
+   * when the user is anonymous and the authenticated does not have the "Create
+   * new content" permission.
+   */
+  function testAnonymousForumMessage() {
+    $langcode = LANGUAGE_NOT_SPECIFIED;
+
+    // The forum ID to use.
+    $tid = 1;
+
+    // Create a test node.
+    $title = $this->randomName(20);
+    $edit = array(
+      'title' => $title,
+      "body[$langcode][0][value]" => $this->randomName(25),
+      "taxonomy_forums[und]" => array(1),
+    );
+
+    // Create the forum topic, preselecting the forum ID via a URL parameter.
+    $this->drupalPost('node/add/forum/' . $tid, $edit, t('Save'));
+    $this->drupalLogout();
+
+    // Access the forum list as an anonymous user and test for presence of
+    // message.
+    $this->drupalGet('forum');
+    $this->assertNoRaw(t('<a href="@login">Log in</a> to post new content in the forum.', array('@login' => url('user/login', array('query' => array('destination' => 'forum'))))), 'Log in or register message does not appear.');
+  }
+}
