function CommentAdminTest::testCommentAdmin
Same name in other branches
- 9 core/modules/comment/tests/src/Functional/CommentAdminTest.php \Drupal\Tests\comment\Functional\CommentAdminTest::testCommentAdmin()
- 8.9.x core/modules/comment/tests/src/Functional/CommentAdminTest.php \Drupal\Tests\comment\Functional\CommentAdminTest::testCommentAdmin()
- 10 core/modules/comment/tests/src/Functional/CommentAdminTest.php \Drupal\Tests\comment\Functional\CommentAdminTest::testCommentAdmin()
Tests comment bundle admin.
File
-
core/
modules/ comment/ tests/ src/ Functional/ CommentAdminTest.php, line 184
Class
- CommentAdminTest
- Tests comment approval functionality.
Namespace
Drupal\Tests\comment\FunctionalCode
public function testCommentAdmin() : void {
// Login.
$this->drupalLogin($this->adminUser);
// Browse to comment bundle overview.
$this->drupalGet('admin/structure/comment');
$this->assertSession()
->statusCodeEquals(200);
// Make sure titles visible.
$this->assertSession()
->pageTextContains('Comment type');
$this->assertSession()
->pageTextContains('Description');
// Make sure the description is present.
$this->assertSession()
->pageTextContains('Default comment field');
// Manage fields.
$this->clickLink('Manage fields');
$this->assertSession()
->statusCodeEquals(200);
// Make sure comment_body field is shown.
$this->assertSession()
->pageTextContains('comment_body');
// Rest from here on in is field_ui.
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.