You are here

protected function EmbeddedScheduledUpdateTypeTestBase::checkReferenceCreated in Scheduled Updates 8

Make sure that reference field was created and put on target entity type.

Parameters

$entity_type:

string $bundle:

string $reference_field_label:

string $reference_field_name:

Throws

\Drupal\Core\Entity\EntityStorageException

\Behat\Mink\Exception\ResponseTextException

1 call to EmbeddedScheduledUpdateTypeTestBase::checkReferenceCreated()
EmbeddedScheduledUpdateTypeTestBase::checkAfterTypeCreated in tests/src/FunctionalJavascript/EmbeddedScheduledUpdateTypeTestBase.php

File

tests/src/FunctionalJavascript/EmbeddedScheduledUpdateTypeTestBase.php, line 84
Contains \Drupal\Tests\scheduled_updates\EmbeddedScheduledUpdateTypeTestBase.

Class

EmbeddedScheduledUpdateTypeTestBase
Base test class for embedded update types.

Namespace

Drupal\Tests\scheduled_updates\FunctionalJavascript

Code

protected function checkReferenceCreated($entity_type, $bundle, $reference_field_label, $reference_field_name) {
  $this
    ->loginWithPermissions([
    'administer node fields',
    'administer content types',
  ]);
  $this
    ->drupalGet("admin/structure/types/manage/{$bundle}/fields");
  $this
    ->assertSession()
    ->pageTextContains($reference_field_label);
  $this
    ->assertSession()
    ->pageTextContains($reference_field_name);
  $this
    ->loginLastUser();
}