You are here

public function CommentAdminViewTest::testFilters in Drupal 8

Same name and namespace 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()

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');
}