Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0

This commit is contained in:
Pantheon Automation 2016-10-06 15:16:20 -07:00 committed by Greg Anderson
parent 2f563ab520
commit f1c8716f57
1732 changed files with 52334 additions and 11780 deletions

View file

@ -66,7 +66,7 @@ class CommentLinksTest extends CommentTestBase {
'subject' => $this->randomMachineName(),
'hostname' => '127.0.0.1',
'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
'comment_body' => array(LanguageInterface::LANGCODE_NOT_SPECIFIED => array($this->randomMachineName())),
'comment_body' => array(array('value' => $this->randomMachineName())),
));
$comment->save();
$this->comment = $comment;
@ -101,6 +101,26 @@ class CommentLinksTest extends CommentTestBase {
$this->assertLink('Add new comment');
}
// Change weight to make links go before comment body.
entity_get_display('comment', 'comment', 'default')
->setComponent('links', array('weight' => -100))
->save();
$this->drupalGet($this->node->urlInfo());
$element = $this->cssSelect('article.js-comment > div');
// Get last child element.
$element = end($element[0]);
$this->assertIdentical($element[0]->getName(), 'div', 'Last element is comment body.');
// Change weight to make links go after comment body.
entity_get_display('comment', 'comment', 'default')
->setComponent('links', array('weight' => 100))
->save();
$this->drupalGet($this->node->urlInfo());
$element = $this->cssSelect('article.js-comment > div');
// Get last child element.
$element = end($element[0]);
$this->assertIdentical($element[0]->getName(), 'ul', 'Last element is comment links.');
// Make sure we can hide node links.
entity_get_display('node', $this->node->bundle(), 'default')
->removeComponent('links')