You are here

public function EntityManagerTest::testGetContentHubEnabledEntityTypeIds in Acquia Content Hub 8

Test for getContentHubEnabledEntityTypeIds() method.

@covers ::getContentHubEnabledEntityTypeIds

File

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

Class

EntityManagerTest
PHPUnit for the EntityManager class.

Namespace

Drupal\Tests\acquia_contenthub\Unit

Code

public function testGetContentHubEnabledEntityTypeIds() {
  $entity_manager = new EntityManager($this->loggerFactory, $this->configFactory, $this->clientManager, $this->contentHubEntitiesTracking, $this->entityTypeManager, $this->entityTypeBundleInfoManager, $this->kernel);
  $config_storage = $this
    ->getContentHubConfigStorage();
  $this->entityTypeManager
    ->method('getStorage')
    ->with('acquia_contenthub_entity_config')
    ->willReturn($config_storage);
  $enabled_entity_type_ids = $entity_manager
    ->getContentHubEnabledEntityTypeIds();
  $expected_entity_type_ids = [
    'entity_type_1',
    'entity_type_2',
  ];
  $this
    ->assertEquals($expected_entity_type_ids, $enabled_entity_type_ids);
}