You are here

public static function MockData::getSpecificMapping in GatherContent 8.5

After installing the test configs read the mapping for a given template.

1 call to MockData::getSpecificMapping()
ConfigCreatorTest::testConfigCreate in tests/src/Kernel/ConfigCreatorTest.php
Test config creation.

File

tests/modules/gathercontent_test/src/MockData.php, line 205

Class

MockData
A class for getting static test data.

Namespace

Drupal\gathercontent_test

Code

public static function getSpecificMapping(string $templateId) {
  $mapping_id = \Drupal::entityQuery('gathercontent_mapping')
    ->condition('gathercontent_template_id', $templateId)
    ->execute();
  $mapping_id = reset($mapping_id);
  return Mapping::load($mapping_id);
}