public function DynamicEntityReferenceFieldDependencyTest::testFieldDependenciesAllEntities in Dynamic Entity Reference 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/DynamicEntityReferenceFieldDependencyTest.php \Drupal\Tests\dynamic_entity_reference\Kernel\DynamicEntityReferenceFieldDependencyTest::testFieldDependenciesAllEntities()
Test dependencies when all entity types can be referenced.
File
- tests/
src/ Kernel/ DynamicEntityReferenceFieldDependencyTest.php, line 72
Class
- DynamicEntityReferenceFieldDependencyTest
- Tests for dynamic entity reference field dependencies.
Namespace
Drupal\Tests\dynamic_entity_reference\KernelCode
public function testFieldDependenciesAllEntities() {
$this->fieldStorage
->setSetting('exclude_entity_types', TRUE);
$this->fieldStorage
->setSetting('entity_type_ids', []);
$this->fieldStorage
->save();
// Expected module dependencies.
$module_dependencies = $this->entityTypeProviders;
$module_dependencies[] = 'dynamic_entity_reference';
$this
->assertEqualsCanonicalizing([
'module' => $module_dependencies,
], $this->fieldStorage
->getDependencies());
}