$this->uuid =
$this->
createMock('\Drupal\Component\Uuid\UuidInterface'
);
$this->typedConfigManager =
$this->
createMock('Drupal\Core\Config\TypedConfigManagerInterface'
);
$this->configEntityStorageInterface =
$this->
createMock('Drupal\Core\Entity\EntityStorageInterface'
);
$container =
new ContainerBuilder();
$container->
set('entity_type.manager',
$this->entityTypeManager
);
$container->
set('uuid',
$this->uuid
);
$container->
set('config.typed',
$this->typedConfigManager
);
$container->
set('config.storage',
$this->configEntityStorageInterface
);
\Drupal::
setContainer($container);
} /**
* @covers ::calculateDependencies
*/
public function testCalculateDependencies() { // Mock the interfaces necessary to create a dependency on a bundle entity.
$target_entity_type =
$this->
createMock('\Drupal\Core\Entity\EntityTypeInterface'
);
$target_entity_type->
expects($this->
any()) ->
method('getBundleConfigDependency'
) ->
willReturn(['type' => 'config', 'name' => 'test.test_entity_type.id'
]);