public function DynamicEntityReferenceFieldDependencyTest::testFieldDependenciesNone in Dynamic Entity Reference 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/DynamicEntityReferenceFieldDependencyTest.php \Drupal\Tests\dynamic_entity_reference\Kernel\DynamicEntityReferenceFieldDependencyTest::testFieldDependenciesNone()
Test dependencies when entity types are strict, but none are defined.
File
- tests/
src/ Kernel/ DynamicEntityReferenceFieldDependencyTest.php, line 125
Class
- DynamicEntityReferenceFieldDependencyTest
- Tests for dynamic entity reference field dependencies.
Namespace
Drupal\Tests\dynamic_entity_reference\KernelCode
public function testFieldDependenciesNone() {
$this->fieldStorage
->setSetting('exclude_entity_types', FALSE);
$this->fieldStorage
->setSetting('entity_type_ids', []);
$this->fieldStorage
->save();
// Expected module dependencies.
$module_dependencies[] = 'entity_test';
$module_dependencies[] = 'dynamic_entity_reference';
$this
->assertEqualsCanonicalizing([
'module' => $module_dependencies,
], $this->fieldStorage
->getDependencies());
}