Update to Drupal 8.1.1. For more information, see https://www.drupal.org/node/2718713

This commit is contained in:
Pantheon Automation 2016-05-04 14:35:41 -07:00 committed by Greg Anderson
parent c0a0d5a94c
commit 9eae24d844
669 changed files with 3873 additions and 1553 deletions

View file

@ -8,6 +8,7 @@
use Drupal\comment\CommentInterface;
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Url;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
@ -22,7 +23,7 @@ function forum_help($route_name, RouteMatchInterface $route_match) {
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Forum module lets you create threaded discussion forums with functionality similar to other message board systems. In a forum, users post topics and threads in nested hierarchies, allowing discussions to be categorized and grouped.') . '</p>';
$output .= '<p>' . t('The Forum module adds and uses a content type called <em>Forum topic</em>. For background information on content types, see the <a href=":node_help">Node module help page</a>.', array(':node_help'=>\Drupal::url('help.page', array('name' => 'node')))) . '</p>';
$output .= '<p>' . t('The Forum module adds and uses a content type called <em>Forum topic</em>. For background information on content types, see the <a href=":node_help">Node module help page</a>.', array(':node_help' => \Drupal::url('help.page', array('name' => 'node')))) . '</p>';
$output .= '<p>' . t('A forum is represented by a hierarchical structure, consisting of:');
$output .= '<ul>';
$output .= '<li>' . t('<em>Forums</em> (for example, <em>Recipes for cooking vegetables</em>)') . '</li>';
@ -134,7 +135,7 @@ function forum_uri($forum) {
/**
* Implements hook_entity_bundle_field_info_alter().
*/
function forum_entity_bundle_field_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type, $bundle) {
function forum_entity_bundle_field_info_alter(&$fields, EntityTypeInterface $entity_type, $bundle) {
if ($entity_type->id() == 'node' && !empty($fields['taxonomy_forums'])) {
$fields['taxonomy_forums']->addConstraint('ForumLeaf', []);
}

View file

@ -153,7 +153,7 @@ class ForumTest extends WebTestBase {
$this->generateForumTopics();
// Login an unprivileged user to view the forum topics and generate an
// Log in an unprivileged user to view the forum topics and generate an
// active forum topics list.
$this->drupalLogin($this->webUser);
// Verify that this user is shown a message that they may not post content.
@ -180,7 +180,7 @@ class ForumTest extends WebTestBase {
$this->drupalGet('forum/' . $this->forum['tid']);
$this->assertLink(t('Add new Forum topic'));
// Login a user with permission to edit any forum content.
// Log in a user with permission to edit any forum content.
$this->drupalLogin($this->editAnyTopicsUser);
// Verify that this user can edit forum content authored by another user.
$this->verifyForums($own_topics_user_node, TRUE);
@ -281,7 +281,7 @@ class ForumTest extends WebTestBase {
* The logged-in user.
*/
private function doAdminTests($user) {
// Login the user.
// Log in the user.
$this->drupalLogin($user);
// Add forum to the Tools menu.
@ -467,7 +467,7 @@ class ForumTest extends WebTestBase {
* User has 'access administration pages' privilege.
*/
private function doBasicTests($user, $admin) {
// Login the user.
// Log in the user.
$this->drupalLogin($user);
// Attempt to create forum topic under a container.
$this->createForumTopic($this->forumContainer, TRUE);
@ -481,7 +481,7 @@ class ForumTest extends WebTestBase {
* Tests a forum with a new post displays properly.
*/
function testForumWithNewPost() {
// Login as the first user.
// Log in as the first user.
$this->drupalLogin($this->adminUser);
// Create a forum container.
$this->forumContainer = $this->createForum('container');
@ -490,7 +490,7 @@ class ForumTest extends WebTestBase {
// Create a topic.
$node = $this->createForumTopic($this->forum, FALSE);
// Login as a second user.
// Log in as a second user.
$this->drupalLogin($this->postCommentUser);
// Post a reply to the topic.
$edit = array();
@ -504,7 +504,7 @@ class ForumTest extends WebTestBase {
$this->assertResponse(200);
$this->assertFieldByName('comment_body[0][value]');
// Login as the first user.
// Log in as the first user.
$this->drupalLogin($this->adminUser);
// Check that forum renders properly.
$this->drupalGet("forum/{$this->forum['tid']}");

View file

@ -1,17 +1,17 @@
<?php
namespace Drupal\forum\Tests;
namespace Drupal\Tests\forum\Kernel;
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
use Drupal\node\Entity\Node;
use Drupal\taxonomy\Entity\Term;
use Drupal\system\Tests\Entity\EntityUnitTestBase;
/**
* Tests forum validation constraints.
*
* @group forum
*/
class ForumValidationTest extends EntityUnitTestBase {
class ForumValidationTest extends EntityKernelTestBase {
/**
* Modules to install.