function CommentAdminViewTest::testFilters

Same name in other branches
  1. 9 core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php \Drupal\Tests\comment\Kernel\Views\CommentAdminViewTest::testFilters()
  2. 10 core/modules/comment/tests/src/Kernel/Views/CommentAdminViewTest.php \Drupal\Tests\comment\Kernel\Views\CommentAdminViewTest::testFilters()
  3. 11.x 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 130

Class

CommentAdminViewTest
Tests comment admin view filters.

Namespace

Drupal\Tests\comment\Kernel\Views

Code

public function testFilters() {
    $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.