function ConfigEntityBaseUnitTest::providerOnDependencyRemovalWithPluginCollections
Data provider for testOnDependencyRemovalWithPluginCollections.
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityBaseUnitTest.php, line 418
Class
Namespace
Drupal\Tests\Core\Config\EntityCode
public static function providerOnDependencyRemovalWithPluginCollections() : array {
return [
// The plugin fixes all the dependencies.
[
// Plugin ::onCollectionDependencyRemoval() return.
RemovableDependentPluginReturn::Changed,
// Expected dependencies after ::onCollectionDependencyRemoval().
[],
// Expected return for ConfigEntityInterface::onDependencyRemoval().
TRUE,
],
// The plugin is removed from the collection.
[
// Plugin ::onCollectionDependencyRemoval() return.
RemovableDependentPluginReturn::Remove,
// Expected dependencies after ::onCollectionDependencyRemoval().
[],
// Expected return for ConfigEntityInterface::onDependencyRemoval().
TRUE,
],
// The plugin does not fix any dependencies.
[
// Plugin ::onCollectionDependencyRemoval() return.
RemovableDependentPluginReturn::Unchanged,
// Expected dependencies after ::onCollectionDependencyRemoval().
[
'config' => [
'bar',
'baz',
],
],
// Expected return for ConfigEntityInterface::onDependencyRemoval().
FALSE,
],
// The plugin partially fixes dependencies.
[
// Plugin ::onCollectionDependencyRemoval() return.
RemovableDependentPluginReturn::Changed,
// Expected dependencies after ::onCollectionDependencyRemoval().
[
'config' => [
'bar',
],
],
// Expected return for ConfigEntityInterface::onDependencyRemoval().
TRUE,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.