Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
|
@ -26,6 +26,12 @@ class CommentInterfaceTest extends CommentTestBase {
|
|||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->drupalLogin($this->adminUser);
|
||||
// Make sure that comment field title is not displayed when there's no
|
||||
// comments posted.
|
||||
$this->drupalGet($this->node->urlInfo());
|
||||
$this->assertNoPattern('@<h2[^>]*>Comments</h2>@', 'Comments title is not displayed.');
|
||||
|
||||
// Set comments to have subject and preview disabled.
|
||||
$this->setCommentPreview(DRUPAL_DISABLED);
|
||||
$this->setCommentForm(TRUE);
|
||||
$this->setCommentSubject(FALSE);
|
||||
|
@ -44,6 +50,10 @@ class CommentInterfaceTest extends CommentTestBase {
|
|||
$comment = $this->postComment($this->node, $comment_text);
|
||||
$this->assertTrue($this->commentExists($comment), 'Comment found.');
|
||||
|
||||
// Test the comment field title is displayed when there's comments.
|
||||
$this->drupalGet($this->node->urlInfo());
|
||||
$this->assertPattern('@<h2[^>]*>Comments</h2>@', 'Comments title is displayed.');
|
||||
|
||||
// Set comments to have subject and preview to required.
|
||||
$this->drupalLogout();
|
||||
$this->drupalLogin($this->adminUser);
|
||||
|
@ -83,7 +93,7 @@ class CommentInterfaceTest extends CommentTestBase {
|
|||
)));
|
||||
|
||||
// Test changing the comment author to "Anonymous".
|
||||
$comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('name' => ''));
|
||||
$comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('uid' => ''));
|
||||
$this->assertTrue($comment->getAuthorName() == t('Anonymous') && $comment->getOwnerId() == 0, 'Comment author successfully changed to anonymous.');
|
||||
|
||||
// Test changing the comment author to an unverified user.
|
||||
|
@ -95,7 +105,7 @@ class CommentInterfaceTest extends CommentTestBase {
|
|||
|
||||
// Test changing the comment author to a verified user.
|
||||
$this->drupalGet('comment/' . $comment->id() . '/edit');
|
||||
$comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('name' => $this->webUser->getUsername()));
|
||||
$comment = $this->postComment(NULL, $comment->comment_body->value, $comment->getSubject(), array('uid' => $this->webUser->getUsername() . ' (' . $this->webUser->id() . ')'));
|
||||
$this->assertTrue($comment->getAuthorName() == $this->webUser->getUsername() && $comment->getOwnerId() == $this->webUser->id(), 'Comment author successfully changed to a registered user.');
|
||||
|
||||
$this->drupalLogout();
|
||||
|
|
Reference in a new issue