You are here

protected function WebTestExtended::checkExpectedCheckboxes in Scheduled Updates 8

Utility function to check that a checkboxes has the expected options.

Parameters

string $field_name: The field name.

array $expected_options: The expected options.

2 calls to WebTestExtended::checkExpectedCheckboxes()
EmbeddedScheduledUpdateTypeTest::createType in tests/src/FunctionalJavascript/EmbeddedScheduledUpdateTypeTest.php
Create a scheduled update type via the UI.
ScheduledUpdatesTestBase::createType in tests/src/FunctionalJavascript/ScheduledUpdatesTestBase.php

File

tests/src/FunctionalJavascript/WebTestExtended.php, line 151
Contains \Drupal\Tests\scheduled_updates\WebTestExtended.

Class

WebTestExtended
BrowserTestBase plus project agnostic helper functions.

Namespace

Drupal\Tests\scheduled_updates\FunctionalJavascript

Code

protected function checkExpectedCheckboxes($field_name, $expected_options) {
  foreach ($expected_options as $expected_option) {
    $this
      ->assertFieldByName("base_fields[{$expected_option}]");
  }
}