public function HandlerTest::testNoDuplicateFields in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views_ui/tests/src/Functional/HandlerTest.php \Drupal\Tests\views_ui\Functional\HandlerTest::testNoDuplicateFields()
 - 10 core/modules/views_ui/tests/src/Functional/HandlerTest.php \Drupal\Tests\views_ui\Functional\HandlerTest::testNoDuplicateFields()
 
Ensures that neither node type or node ID appears multiple times.
See also
File
- core/
modules/ views_ui/ tests/ src/ Functional/ HandlerTest.php, line 257  
Class
- HandlerTest
 - Tests handler UI for views.
 
Namespace
Drupal\Tests\views_ui\FunctionalCode
public function testNoDuplicateFields() {
  $handler_types = [
    'field',
    'filter',
    'sort',
    'argument',
  ];
  foreach ($handler_types as $handler_type) {
    $add_handler_url = 'admin/structure/views/nojs/add-handler/test_node_view/default/' . $handler_type;
    $this
      ->drupalGet($add_handler_url);
    $this
      ->assertNoDuplicateField('ID', 'Content');
    $this
      ->assertNoDuplicateField('ID', 'Content revision');
    $this
      ->assertNoDuplicateField('Content type', 'Content');
    $this
      ->assertNoDuplicateField('UUID', 'Content');
    $this
      ->assertNoDuplicateField('Revision ID', 'Content');
    $this
      ->assertNoDuplicateField('Revision ID', 'Content revision');
  }
}