function ConfigDependenciesTest::testOnDependencyRemovalRemoveUnrelatedDependency
Tests on dependency removal remove unrelated dependency.
@legacy-covers ::onDependencyRemoval @legacy-covers ::onDependencyRemovalForMethodGranularity @legacy-covers ::onDependencyRemovalForResourceGranularity
Attributes
#[DataProvider('providerBasicDependencies')]
File
-
core/
modules/ rest/ tests/ src/ Kernel/ Entity/ ConfigDependenciesTest.php, line 53
Class
Namespace
Drupal\Tests\rest\Kernel\EntityCode
public function testOnDependencyRemovalRemoveUnrelatedDependency(array $configuration) : void {
$config_dependencies = new ConfigDependencies([
'json' => 'serialization',
], [
'basic_auth' => 'basic_auth',
]);
$rest_config = RestResourceConfig::create($configuration);
$this->assertFalse($config_dependencies->onDependencyRemoval($rest_config, [
'module' => [
'node',
],
]));
$this->assertEquals($configuration['configuration'], $rest_config->get('configuration'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.