You are here

public function OgMenuConfigImportTest::testModuleInstallationWithDefaultConfig in Organic Groups Menu (OG Menu) 8

Checks the creation of the group reference field from module config.

File

tests/src/Kernel/OgMenuConfigImportTest.php, line 32

Class

OgMenuConfigImportTest
@group og_menu

Namespace

Drupal\Tests\og_menu\Kernel

Code

public function testModuleInstallationWithDefaultConfig() {

  /** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */
  $module_installer = $this->container
    ->get('module_installer');

  /** @var \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager */
  $entity_field_manager = $this->container
    ->get('entity_field.manager');
  $module_installer
    ->install([
    'og_menu_test',
  ]);
  $this
    ->assertArrayHasKey(OgGroupAudienceHelper::DEFAULT_FIELD, $entity_field_manager
    ->getFieldStorageDefinitions('ogmenu_instance'));
}