private function EntityManagerTest::getContentHubEntityTypeConfigEntityId in Acquia Content Hub 8
Generate a list of config entity configurations.
1 call to EntityManagerTest::getContentHubEntityTypeConfigEntityId()
- EntityManagerTest::testIsEligibleDependency in tests/
src/ Unit/ EntityManagerTest.php - Test for isEligibleDependency(), isEligibleEntity() methods.
File
- tests/
src/ Unit/ EntityManagerTest.php, line 395
Class
- EntityManagerTest
- PHPUnit for the EntityManager class.
Namespace
Drupal\Tests\acquia_contenthub\UnitCode
private function getContentHubEntityTypeConfigEntityId($id) {
$bundles = [
'node' => [
'article' => [
'enable_index' => 1,
'enable_viewmodes' => 1,
'rendering' => [
'view_node1',
'view_node2',
'view_node3',
],
],
],
'file' => [
'image' => [
'enable_index' => 1,
'enable_viewmodes' => 1,
'rendering' => [
'view_file1',
'view_file2',
'view_file3',
],
],
],
];
$values = [
'id' => $id,
];
$config_entity = new ContentHubEntityTypeConfig($values, 'acquia_contenthub_entity_config');
$config_entity
->setBundles($bundles[$id]);
return $config_entity;
}