function FieldUITest::testHandlerUIAggregation
Tests the basic field handler form when aggregation is enabled.
File
- 
              core/
modules/ field/ tests/ src/ Functional/ Views/ FieldUITest.php, line 108  
Class
- FieldUITest
 - Tests the UI of the field handler.
 
Namespace
Drupal\Tests\field\Functional\ViewsCode
public function testHandlerUIAggregation() {
  // Enable aggregation.
  $edit = [
    'group_by' => '1',
  ];
  $this->drupalGet('admin/structure/views/nojs/display/test_view_fieldapi/default/group_by');
  $this->submitForm($edit, 'Apply');
  $url = "admin/structure/views/nojs/handler/test_view_fieldapi/default/field/field_name_0";
  $this->drupalGet($url);
  $this->assertSession()
    ->statusCodeEquals(200);
  // Test the click sort column options.
  // Tests the available formatter options.
  $options = $this->assertSession()
    ->selectExists('edit-options-click-sort-column')
    ->findAll('css', 'option');
  $options = array_map(function ($item) {
    return $item->getValue();
  }, $options);
  $this->assertEqualsCanonicalizing([
    'format',
    'value',
  ], $options);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.