// 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'
]);
$this->entityTypeManager->
expects($this->
any()) ->
method('getDefinition'
) ->
with('test_entity_type'
) ->
willReturn($target_entity_type);
$config =
new ContentLanguageSettings([ 'target_entity_type_id' => 'test_entity_type',
'target_bundle' => 'test_bundle',
], 'language_content_settings'
);
$dependencies =
$config->
calculateDependencies()->
getDependencies();
$this->
assertContains('test.test_entity_type.id',
$dependencies['config'
]);
} /**
* @covers ::id
*/
public function testId() {