You are here

public function HandlerTest::testNoDuplicateFields in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views_ui/src/Tests/HandlerTest.php \Drupal\views_ui\Tests\HandlerTest::testNoDuplicateFields()

Ensures that neither node type or node ID appears multiple times.

See also

\Drupal\views\EntityViewsData

File

core/modules/views_ui/src/Tests/HandlerTest.php, line 233
Contains \Drupal\views_ui\Tests\HandlerTest.

Class

HandlerTest
Tests handler UI for views.

Namespace

Drupal\views_ui\Tests

Code

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('Node ID', 'Content');
    $this
      ->assertNoDuplicateField('Node ID', 'Content revision');
    $this
      ->assertNoDuplicateField('Type', 'Content');
    $this
      ->assertNoDuplicateField('UUID', 'Content');
    $this
      ->assertNoDuplicateField('Revision ID', 'Content');
    $this
      ->assertNoDuplicateField('Revision ID', 'Content revision');
  }
}