You are here

protected function ScheduledUpdatesTestBase::checkFieldLabels in Scheduled Updates 8

Parameters

array $fields:

2 calls to ScheduledUpdatesTestBase::checkFieldLabels()
IndependentScheduledUpdateTypeTest::checkAddForm in tests/src/FunctionalJavascript/IndependentScheduledUpdateTypeTest.php
Check that the Scheduled Update add form is correct.
ScheduledUpdatesTestBase::cloneFields in tests/src/FunctionalJavascript/ScheduledUpdatesTestBase.php
Clone multiple fields on the Clone Field Page.

File

tests/src/FunctionalJavascript/ScheduledUpdatesTestBase.php, line 108
Contains \Drupal\Tests\scheduled_updates\ScheduledUpdatesTestBase.

Class

ScheduledUpdatesTestBase
Define base class for Scheduled Updates Tests

Namespace

Drupal\Tests\scheduled_updates\FunctionalJavascript

Code

protected function checkFieldLabels(array $fields) {
  foreach ($fields as $input_name => $field_info) {

    // We only know what base field labels should look like.
    if (stripos($input_name, 'base_fields[') === 0) {

      // Check the field label exists.
      $this
        ->assertSession()
        ->pageTextContains($field_info['label']);
    }
    else {

      // @test that Configurable fields were cloned.
    }
  }
}