You are here

public function ConfigDependenciesTest::testCalculateDependencies in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testCalculateDependencies()
  2. 9 core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testCalculateDependencies()

@covers ::calculateDependencies

@dataProvider providerBasicDependencies

File

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

Class

ConfigDependenciesTest
@coversDefaultClass \Drupal\rest\Entity\ConfigDependencies

Namespace

Drupal\Tests\rest\Kernel\Entity

Code

public function testCalculateDependencies(array $configuration) {
  $config_dependencies = new ConfigDependencies([
    'json' => 'serialization',
  ], [
    'basic_auth' => 'basic_auth',
  ]);
  $rest_config = RestResourceConfig::create($configuration);
  $result = $config_dependencies
    ->calculateDependencies($rest_config);
  $this
    ->assertEquals([
    'module' => [
      'basic_auth',
      'serialization',
    ],
  ], $result);
}