public function ImportQueueItemTest::testImportWithQueue in Acquia Content Hub 8
Test Import with Queue.
File
- tests/
src/ Unit/ QueueItem/ ImportQueueItemTest.php, line 79
Class
- ImportQueueItemTest
- PHPUnit test for the ImportQueueItem.
Namespace
Drupal\Tests\acquia_contenthub\Unit\QueueItemCode
public function testImportWithQueue() {
$importEntityManager = $this
->getMockBuilder(ImportEntityManager::class)
->disableOriginalConstructor()
->setMethods([
'addEntityToImportQueue',
])
->getMock();
$container = new ContainerBuilder();
$config = $this
->getConfigFactoryStub([
'acquia_contenthub.entity_config' => [
'import_with_queue' => TRUE,
],
]);
$container
->set('config.factory', $config);
$container
->set('config.factory', $config);
\Drupal::unsetContainer();
\Drupal::setContainer($container);
$import_with_queue = \Drupal::config('acquia_contenthub.entity_config')
->get('import_with_queue');
$this
->assertTrue($import_with_queue);
}