public function ConfigEntityDependencyTest::testEmptyDependencies in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityDependencyTest::testEmptyDependencies()
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityDependencyTest.php, line 15
Class
- ConfigEntityDependencyTest
- Tests the ConfigEntityDependency class.
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testEmptyDependencies() {
$dep = new ConfigEntityDependency('config_test.dynamic.entity_id', []);
$this
->assertEquals('config_test.dynamic.entity_id', $dep
->getConfigDependencyName());
$this
->assertEquals([], $dep
->getDependencies('theme'));
$this
->assertEquals([], $dep
->getDependencies('config'));
$this
->assertEquals([
'config_test',
], $dep
->getDependencies('module'));
$this
->assertTrue($dep
->hasDependency('module', 'config_test'));
$this
->assertFalse($dep
->hasDependency('module', 'views'));
}