You are here

public function ImportEntityManagerTest::buildConfigContainer in Acquia Content Hub 8

Build a container that has some configuration available.

Parameters

array $config: THe container config array.

2 calls to ImportEntityManagerTest::buildConfigContainer()
ImportEntityManagerTest::testImportWithoutQueue in tests/src/Unit/ImportEntityManagerTest.php
Ensure if configuration is correct entity will be imported immediately.
ImportEntityManagerTest::testImportWithQueue in tests/src/Unit/ImportEntityManagerTest.php
Ensure that if configuration is set the entity will be added to the queue.

File

tests/src/Unit/ImportEntityManagerTest.php, line 1022

Class

ImportEntityManagerTest
PHPUnit test for the ImportEntityManager class.

Namespace

Drupal\Tests\acquia_contenthub\Unit

Code

public function buildConfigContainer(array $config = []) {
  $container = new ContainerBuilder();
  $config = $this
    ->getConfigFactoryStub($config);
  $container
    ->set('config.factory', $config);
  \Drupal::unsetContainer();
  \Drupal::setContainer($container);
}