function HandlerTest::assertNoDuplicateField
Asserts that fields only appear once.
@internal
Parameters
string $field_name: The field name.
string $entity_type: The entity type to which the field belongs.
1 call to HandlerTest::assertNoDuplicateField()
- HandlerTest::testNoDuplicateFields in core/modules/ views_ui/ tests/ src/ Functional/ HandlerTest.php 
- Ensures that neither node type or node ID appears multiple times.
File
- 
              core/modules/ views_ui/ tests/ src/ Functional/ HandlerTest.php, line 300 
Class
- HandlerTest
- Tests handler UI for views.
Namespace
Drupal\Tests\views_ui\FunctionalCode
public function assertNoDuplicateField(string $field_name, string $entity_type) : void {
  $this->assertSession()
    ->elementsCount('xpath', '//td[.="' . $entity_type . '"]/preceding-sibling::td[@class="title" and .="' . $field_name . '"]', 1);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
