You are here

public function FieldGroupRowsWebTest::testGroupRows in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php \Drupal\Tests\views\Functional\Handler\FieldGroupRowsWebTest::testGroupRows()
  2. 9 core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php \Drupal\Tests\views\Functional\Handler\FieldGroupRowsWebTest::testGroupRows()

Testing when "Display all values in the same row" is checked.

File

core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php, line 100

Class

FieldGroupRowsWebTest
Tests the "Display all values in the same row" setting.

Namespace

Drupal\Tests\views\Functional\Handler

Code

public function testGroupRows() {
  $this
    ->drupalGet('test-group-rows');
  $result = $this
    ->cssSelect('div.views-field-field-views-testing-group- div');
  $rendered_value = [];
  foreach ($result as $row) {
    $rendered_value[] = $row
      ->getText();
  }
  $this
    ->assertEquals([
    'a, b, c',
  ], $rendered_value);
}