function ConfigDependenciesTest::testCalculateDependencies

Same name in this branch
  1. 9 core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testCalculateDependencies()
Same name in other branches
  1. 8.9.x core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testCalculateDependencies()
  2. 10 core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testCalculateDependencies()
  3. 11.x core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php \Drupal\Tests\rest\Kernel\Entity\ConfigDependenciesTest::testCalculateDependencies()

@covers ::calculateDependencies

@dataProvider providerBasicDependencies

File

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

Class

ConfigDependenciesTest
@coversDefaultClass \Drupal\rest\Entity\ConfigDependencies

Namespace

Drupal\Tests\hal\Kernel\rest\Entity

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.