public static function MockData::getMapping in GatherContent 8.4
Same name and namespace in other branches
- 8.5 tests/modules/gathercontent_test/src/MockData.php \Drupal\gathercontent_test\MockData::getMapping()
After installing the test configs read the mapping.
2 calls to MockData::getMapping()
- ContentProcessorTest::testCreateNode in tests/
src/ Kernel/ ContentProcessorTest.php - Data provider for createNodeTest.
- ImporterTest::testImport in tests/
src/ Kernel/ ImporterTest.php - Test the import function.
File
- tests/
modules/ gathercontent_test/ src/ MockData.php, line 192
Class
- MockData
- A class for getting static test data.
Namespace
Drupal\gathercontent_testCode
public static function getMapping() {
$mapping_id = \Drupal::entityQuery('gathercontent_mapping')
->execute();
$mapping_id = reset($mapping_id);
return Mapping::load($mapping_id);
}