You are here

private function EntityManagerTest::getContentHubConfigStorage in Acquia Content Hub 8

Defines the Content Hub Entity Types Configuration.

Return value

array An array of Content Hub Entity Types configuration.

1 call to EntityManagerTest::getContentHubConfigStorage()
EntityManagerTest::testGetContentHubEnabledEntityTypeIds in tests/src/Unit/EntityManagerTest.php
Test for getContentHubEnabledEntityTypeIds() method.

File

tests/src/Unit/EntityManagerTest.php, line 205

Class

EntityManagerTest
PHPUnit for the EntityManager class.

Namespace

Drupal\Tests\acquia_contenthub\Unit

Code

private function getContentHubConfigStorage() {

  // Creating Configuration Entities.
  $config_entity1 = $this
    ->getContentHubEntityTypeConfigEntity('entity_type_1');
  $config_entity2 = $this
    ->getContentHubEntityTypeConfigEntity('entity_type_2');
  $config_entity3 = $this
    ->getContentHubEntityTypeConfigEntity('entity_type_3');

  // Grouping configuration entities.
  $config_entities = [
    'entity_type_1' => $config_entity1,
    'entity_type_2' => $config_entity2,
    'entity_type_3' => $config_entity3,
  ];
  $config_storage = $this
    ->createMock('Drupal\\Core\\Entity\\EntityStorageInterface');
  $config_storage
    ->method('loadMultiple')
    ->willReturn($config_entities);
  return $config_storage;
}