function ConfigDependenciesTest::testOnDependencyRemovalRemoveUnrelatedDependency

Same name and namespace in other branches
  1. 9 core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testOnDependencyRemovalRemoveUnrelatedDependency()
  2. 9 core/modules/hal/tests/src/Kernel/rest/Entity/ConfigDependenciesTest.php \Drupal\Tests\hal\Kernel\rest\Entity\ConfigDependenciesTest::testOnDependencyRemovalRemoveUnrelatedDependency()
  3. 8.9.x core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testOnDependencyRemovalRemoveUnrelatedDependency()
  4. 11.x core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testOnDependencyRemovalRemoveUnrelatedDependency()

@covers ::onDependencyRemoval
@covers ::onDependencyRemovalForMethodGranularity
@covers ::onDependencyRemovalForResourceGranularity

@dataProvider providerBasicDependencies

File

core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php, line 47

Class

ConfigDependenciesTest
@coversDefaultClass \Drupal\rest\Entity\ConfigDependencies[[api-linebreak]]

Namespace

Drupal\Tests\rest\Kernel\Entity

Code

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.