CommentRowTest.php

Same filename and directory in other branches
  1. 11.x core/modules/comment/tests/src/Functional/Views/CommentRowTest.php
  2. 10 core/modules/comment/tests/src/Functional/Views/CommentRowTest.php
  3. 9 core/modules/comment/tests/src/Functional/Views/CommentRowTest.php
  4. 8.9.x core/modules/comment/tests/src/Functional/Views/CommentRowTest.php

Namespace

Drupal\Tests\comment\Functional\Views

File

core/modules/comment/tests/src/Functional/Views/CommentRowTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\comment\Functional\Views;

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;

/**
 * Tests the comment row plugin.
 */
class CommentRowTest extends CommentTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * Views used by this test.
   *
   * @var array
   */
  public static $testViews = [
    'test_comment_row',
  ];
  
  /**
   * Tests comment row.
   */
  public function testCommentRow() : void {
    $this->drupalGet('test-comment-row');
    $this->assertSession()
      ->elementsCount('xpath', '//article[contains(@class, "comment")]', 1);
  }

}

Classes

Title Deprecated Summary
CommentRowTest Tests the comment row plugin.

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