function CommentAdminViewTest::testFilters

Same name and namespace in other branches
  1. 11.x core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php \Drupal\Tests\comment\Kernel\Views\CommentAdminViewTest::testFilters()
  2. 9 core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php \Drupal\Tests\comment\Kernel\Views\CommentAdminViewTest::testFilters()
  3. 8.9.x core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php \Drupal\Tests\comment\Kernel\Views\CommentAdminViewTest::testFilters()
  4. main core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php \Drupal\Tests\comment\Kernel\Views\CommentAdminViewTest::testFilters()

Tests comment admin view filters.

File

core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php, line 138

Class

CommentAdminViewTest
Tests comment admin view filters.

Namespace

Drupal\Tests\comment\Kernel\Views

Code

public function testFilters() : void {
  $this->doTestFilters('page_published');
  // Unpublish the comments to test the Unapproved comments tab.
  foreach ($this->comments as $comment) {
    $comment->setUnpublished();
    $comment->save();
  }
  $this->doTestFilters('page_unapproved');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.