function HandlerTest::testNoDuplicateFields

Same name and namespace in other branches
  1. 9 core/modules/views_ui/tests/src/Functional/HandlerTest.php \Drupal\Tests\views_ui\Functional\HandlerTest::testNoDuplicateFields()
  2. 10 core/modules/views_ui/tests/src/Functional/HandlerTest.php \Drupal\Tests\views_ui\Functional\HandlerTest::testNoDuplicateFields()
  3. 11.x 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

\Drupal\views\EntityViewsData

File

core/modules/views_ui/tests/src/Functional/HandlerTest.php, line 243

Class

HandlerTest
Tests handler UI for views.

Namespace

Drupal\Tests\views_ui\Functional

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('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');
    }
}

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